我遇到了麻煩PIP在virtualenv中工作,在全球安裝每當我運行下面的命令與下面的輸出:皮普在virtualenv中
$ virtualenv --no-site-packages foo
New python executable in foo/bin/python
Installing setuptools, pip...done.
$ cd foo/
$ source bin/activate
$ pip freeze
Django==1.6.1
PIL==1.1.7
beautifulsoup4==4.3.2
distribute==0.6.34
dj-database-url==0.2.2
dj-static==0.0.5
django-toolbelt==0.0.1
gunicorn==18.0
numpy==1.7.1
psycopg2==2.5.2
pystache==0.5.3
requests==2.2.1
scipy==0.12.0
static==1.0.2
stevedore==0.14.1
virtualenv==1.11.4
virtualenv-clone==0.2.4
virtualenvwrapper==4.2
wsgiref==0.1.2
而且我做了正確的家當:#!/Users/username/Programming/Django_Projects/foo/bin/python
這裏是我所得到的,當我運行which pip
:/Users/username/Programming/Django_Projects/foo/bin/pip
當我嘗試安裝Django:Requirement already satisfied (use --upgrade to upgrade): Django in /usr/local/lib/python2.7/site-packages Cleaning up...
你究竟想完成什麼? – Leonardo
我想將軟件包安裝到virtualenv,但pip不斷嘗試全局安裝軟件包 – rdot