pip riconosce i pacchetti installati globali ..?! :-(pip - Requisito già soddisfatto?
Ho usato virtualenvwrapper gancio preattivare per pulire PYTHONPATH,
export PYTHONPATH=""
then echo $ PYTHONPATH ritorna stringa vuota, ma questo non ha aiutato.
Cosa c'è che non va?
[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)
Non ho usato virtualenvwrapper, ma con virtualenv io uso l'opzione --no-site-packages. Può mkvirtualenv passare questa opzione? –
Sì, ma non è questo il problema. A partire da virtualenv 1.7, i pacchetti --no-site sono diventati di default ed è deprecato. Sto usando 1.8.2. Comunque, l'ho provato anche io e ancora non ho funzionato come previsto ... – bentzy
Prova a stampare 'sys.path' e guarda cosa c'è. – Aman