pip rozpoznaje zainstalowane pakiety globalne ..?! :-(pip - Wymóg już jest spełniony?
Użyłem virtualenvwrapper preactivate hakiem do czyszczenia PYTHONPATH,
export PYTHONPATH=""
następnie echo $ PYTHONPATH zwraca pusty łańcuch, ale to nie pomogło.
Co się stało?
[email protected]:~$ mkvirtualenv test
New python executable in test/bin/python
Installing setuptools............done.
Installing pip...............done.
virtualenvwrapper.user_scripts creating /home/bentzy/.virtualenvs/test/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/bentzy/.virtualenvs/test/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/bentzy/.virtualenvs/test/bin/preactivate
virtualenvwrapper.user_scripts creating /home/bentzy/.virtualenvs/test/bin/postactivate
virtualenvwrapper.user_scripts creating /home/bentzy/.virtualenvs/test/bin/get_env_details
(test)[email protected]:~$ which pip
/home/bentzy/.virtualenvs/test/bin/pip
(test)[email protected]:~$ sudo pip install simplejson
Requirement already satisfied (use --upgrade to upgrade): simplejson in /usr/lib /python2.7/dist-packages
Cleaning up...
(test)[email protected]:~$ echo $PYTHONPATH
(test)[email protected]:~$ pip --version
pip 1.2.1 from /home/bentzy/.virtualenvs/test/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg (python 2.7)
Nie używałem virtualenvwrapper, ale z virtualenv używam opcję --no-site-packages. Czy mkvirtualenv może przekazać tę opcję? –
Tak - ale to nie problem. Od wersji virtualenv 1.7, pakiety -no-site stały się domyślne i są przestarzałe. Im przy użyciu 1.8.2. W każdym razie - próbowałem tego i nadal nie działało zgodnie z oczekiwaniami ... – bentzy
Spróbuj wydrukować 'sys.path' i zobaczyć, co tam jest. – Aman