Tag Archives: python3.5.2

PIP3 upgrade tutorial of Python 3.5.2 under ubantu16

You are using pip version 8.1.1, however version 10.0.1 is available. You should consider upgrading via the ‘pip install –upgrade pip’ install。

Upgrade PIP3

1. Input upgrade command

sudo pip3 install –upgrade pip

Note: if you only do this step, an error will still be reported in the next installation. The error is about: cannot import name ‘main’. So you need to modify the/usr/bin/PIP3 file, see Step 2.  

2. Modify the configuration file

sudo gedit /usr/bin/pip3

Change to read as follows (last line and penultimate line)

#!/usr/bin/python3
# GENERATED BY DEBIAN

import sys

# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
from pip import __main__
if __name__ == '__main__':
    sys.exit(__main__.main())