我对虚拟环境中 pip 的行为有一个非常奇怪的问题。
我已经设定
export PIP_REQUIRE_VIRTUALENV=true
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
export VIRTUALENV_DISTRIBUTE=true
现在,当我在我的 virtualenv 中并想要安装我的依赖项时:
pip install -r requirements/_base.txt
(出于测试目的, requirements/_base.txt 仅包含:)
Django==1.5
无论如何,当我尝试安装它时,我只会得到:
Downloading/unpacking Django==1.5 (from -r requirements/_base.txt (line 1))
Running setup.py egg_info for package Django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
之后,没有安装 Django。
奇怪的部分来了:当我手动安装 Django 时
pip install Django==1.5
它运行良好(尽管出现了相同的两个警告):
Downloading/unpacking Django==1.5
Running setup.py egg_info for package Django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: Django
Running setup.py install for Django
changing mode of build/scripts-2.7/django-admin.py from 644 to 755
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /usr/local/share/python/django-admin.py to 755
Successfully installed Django
Cleaning up...