1

I use python3.5 on Ubuntu 16.04 and after upgrading pip3, i am getting the following error:

**Traceback (most recent call last):
  File "/usr/bin/pip3", line 11, in <module>
    sys.exit(main())

  File "/home/xxx/.local/lib/python3.5/site-packages/pip/__init__.py", line 16, in main
    from pip._internal.utils.entrypoints import _wrapper

  File "/home/xxx/.local/lib/python3.5/site-packages/pip/_internal/utils/entrypoints.py", line 3, in <module>
    from pip._internal.cli.main import main

  File "/home/xxx/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")**
                                   ^  

Looks like pip is broken and i don't know how to resolve this. I have tried uninstalling and installing pip3. but it still gave me the same error. Can anyone please help ?

2 Answers2

0

Wrong Version of python, since version 0.8, Pip supports pip{version}. You can use it the same as easy_install-{version}:

$ pip2.6 install otherpackage
$ pip2.7 install mybarpackage
0

You can try to install an old version of pip:

first of all delete current pip:

sudo apt-get remove --purge python-pip
sudo apt-get autoremove
sudo rm -f /usr/local/bin/pip

After that download and install pip for you python version:

curl  https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py
python get-pip.py