您的位置:首页 > 其它

ubuntu16.04下更新pip

2016-12-10 20:41 92 查看
使用pip install –upgrade pip 总是报错。。。。

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 13] 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’

尝试用如下命令进行更新pip成功解决了以上的问题

sudo python -m pip install –upgrade pip

The directory ‘/home/wang/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

You 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 is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: