I install pip with:
$ sudo apt-get install python-setuptools, python-pip
But when I try install something with pip i have this error
sudo pip install Flask
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2565, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'pip') not found
why?? Thanks.
I find there are multiple version pip on my Ubuntu,I followed these steps and it worked:
sudo apt-get remove python-pip
sudo rm -rf /usr/local/bin/pip-2.7 sudo rm -rf /usr/local/bin/pip
sudo rm -rf /usr/local/lib/python2.7/dist-packages/pip-1.4.1.egg-info
sudo easy_install -m pip-2.7 sudo easy_install -m pip
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python get-pip.py
I remove setuptools 0.9.4 and do 'pip install --upgrade setuptools' and work good.
you may check the /usr/bin/pip file, if it links to pip2, then change the first line of pip2 from '/usr/bin/python' to '/usr/bin/python2.7' or '/usr/bin/python2.x' matching pip2. If it links to pip3, then change to python3 or the version python3.x matching pip3.
It works for me because I have installed python 2.7 and 3 so and pip. So when I use 'pip' it using python3 as default, which resulting in the same output.