pip - Requirement already satisfied?

Tag: virtualenv , pip , virtualenvwrapper Author: carlosliutw Date: 2013-01-17

pip recognize global installed packages..?! :-(

I've used virtualenvwrapper preactivate hook to clean PYTHONPATH,

export PYTHONPATH="" 

then echo $PYTHONPATH returns empty string, but this didn't help.

What's wrong?

[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)

Best Answer

You are using sudo to install simplejson, but if you use sudo your $PATH may be changed, and that seems to be the problem.

Just use pip install simplejson (no sudo included) and it is probably going to work.

Use sudo only when you want to affect your whole system.

comments:

Exactly! Thanks.

Other Answer1

Already satisfied means that you already install "it".

try: pip uninstall simplejson

and then: pip install simplejson