10

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.

F.N.B
  • 1,539
  • 6
  • 23
  • 39

5 Answers5

18

sudo python3 -m pip install --upgrade --force-reinstall pip
may do the trick. Try it

Brian Brix
  • 449
  • 4
  • 12
7

I remove setuptools 0.9.4 and do 'pip install --upgrade setuptools' and work good.

F.N.B
  • 1,539
  • 6
  • 23
  • 39
1

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.

hannah
  • 11
  • 5
  • Possible duplicate of : https://stackoverflow.com/questions/11268501/how-to-use-pip-with-python-3-x-alongside-python-2-x?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Meloman May 16 '18 at 08:34
  • In latest systems where by default python3 is installed, this helped. Thanks. – viggy May 21 '20 at 09:52
1

I was facing almost same error and having python2.7 installed on my mac. I tried sudo python2.7 -m pip install --upgrade --force-reinstall pip and it worked for me. If you have python3 installed then you can try sudo python3 -m pip install --upgrade --force-reinstall pip Hope it will work.

0

I find there are multiple version pip on my Ubuntu,I followed these steps and it worked:

  1. sudo apt-get remove python-pip
  2. sudo rm -rf /usr/local/bin/pip-2.7 sudo rm -rf /usr/local/bin/pip
  3. sudo rm -rf /usr/local/lib/python2.7/dist-packages/pip-1.4.1.egg-info
  4. sudo easy_install -m pip-2.7 sudo easy_install -m pip
  5. curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
  6. sudo python get-pip.py
pigletfly
  • 1,051
  • 1
  • 16
  • 32
  • Thanks, your idea gave me the idea to remove the pip folders in my /usr/local/lib/python3.10 which fixed my similar issues! – Cheetaiean Mar 24 '22 at 00:57