admin 管理员组文章数量: 1086866
python升级pip失败
1、报pip 8.1.1 Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr Successfully installed pip-8.1.1 You are using pip version 8.1.1, however version 19.1.1 is available.
如下
sudo pip install --upgrade pip
The directory '/home/osrc/.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.
The directory '/home/osrc/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading .1.1-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 91kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.1
Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
可使用以下命令解决 sudo pip install --upgrade pip --user
sudo pip install --upgrade pip --user
/home/osrc/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
The directory '/home/osrc/.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.
The directory '/home/osrc/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading .1.1-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 11kB/s
Installing collected packages: pip
Found existing installation: pip 19.0.3
Uninstalling pip-19.0.3:
Successfully uninstalled pip-19.0.3
Successfully installed pip-19.1.1
安装成功后,在使用pip install xxx 时还会报以下错误,解决方法如下
2、报 "/usr/local/bin/pip", line 7, in
第一种解决方法:
根据以上报错的路径
/usr/local/bin/
用vim直接编辑
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())
第二种解决方法【推荐】
wget .py
sudo python get-pip.py
本文标签: python升级pip失败
版权声明:本文标题:python升级pip失败 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1698377923a296644.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论