Update Pip under ubuntu16.04

Source: Internet
Author: User
Tags parent directory

Using PIP Install–upgrade pip always complains ....
Uninstalling pip-7.1.0:
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.5/shutil.py", line 538, in move
Os.rename (SRC, REAL_DST)
Permissionerror: [Errno] Permission denied: '/usr/local/lib/python3.5/dist-packages/pip-7.1.0-py3.5.egg '-> '/ Tmp/pip-whm8ys6u-uninstall/usr/local/lib/python3.5/dist-packages/pip-7.1.0-py3.5.egg '

attempting to update the PIP with the following command successfully solves the above problem
sudo python-m pip install–upgrade pip
The directory '/home/wang/.cache/pip/http ' or its parent directory isn't owned by the current user and the cache has been Disabled. Please check the permissions and owner of this directory. If executing pip with sudo, your may want sudo ' s-h flag.
You are are using PIP version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the ' pip install–upgrade Pip ' command.
The directory '/home/wang/.cache/pip/http ' or its parent directory isn't owned by the current user and the cache has been Disabled. Please check the permissions and owner of this directory. If executing pip with sudo, your may want sudo ' s-h flag.
Collecting Pip
Downloading PIP-9.0.1-PY2.PY3-NONE-ANY.WHL (1.3MB)
100% |████████████████████████████████| 1.3MB 127kb/s
Installing collected Packages:pip
Found existing Installation:pip 7.1.0
Uninstalling pip-7.1.0:
Successfully uninstalled pip-7.1.0
Successfully installed pip-9.0.1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.