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 pipDownloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)100% |████████████████████████████████| 1.4MB 91kB/s
Installing collected packages: pipFound existing installation: pip 8.1.1Not 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 pipDownloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)100% |████████████████████████████████| 1.4MB 11kB/s
Installing collected packages: pipFound existing installation: pip 19.0.3Uninstalling 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 <module>

第一种解决方法:

根据以上报错的路径

/usr/local/bin/

用vim直接编辑

from pip import __main__if __name__ == '__main__':sys.exit(__main__._main())

第二种解决方法【推荐】

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

python 更新pip 失败问题总结相关推荐

  1. python更新pip失败-解决Python pip 自动更新升级失败的问题

    在使用python pip的时候,经常会发生pip版本过低导致失败的情况,这时候,系统会提示让你使用如下命令对pip进行升级更新: python -m pip install --upgrade pi ...

  2. python更新pip失败-新手求助, python 升级 pip 失败

    7 2016-03-28 13:10:10 +08:00 @lxy pip 7.1.2 from /Library/Python/2.7/site-packages/pip-7.1.2-py2.7.e ...

  3. Python更新PIP至最新版本

    有时我们使用pip为python安装模块"python -m pip install **"时,系统提醒需要更新pip版本,使用以下指令即可: python -m pip inst ...

  4. python更新pip后报异常

    1.当pip的版本更新后,在使用pip install 命令时会提示python.exe -m pip install --upgrade pip,进行更新pip的版本: 但当执行完命令后会偶然出现报 ...

  5. Python更新pip错误解决方法

    在使用python不久的朋友总会碰上报各种错误,像pip总是需要更新,根据更新提示: python -m pip install --upgrade pip 输入以上代码,有时候会报以下错误: 遇到这 ...

  6. 在pycharm中更新pip失败

    尝试了网上的各种方法,各种翻车 删除虚拟环境中的这两个文件夹,包括pip,有只删除pip-21.1.2.dist-info这个个文件夹然后重新安装pip之后在更新,我试了没有用 下载 get-pip. ...

  7. python 更新 pip 命令

    pip更新命令 python -m pip install --upgrade pip

  8. python升级pip_新手求助, python 升级 pip 失败

    7 2016-03-28 13:10:10 +08:00 @lxy pip 7.1.2 from /Library/Python/2.7/site-packages/pip-7.1.2-py2.7.e ...

  9. Python升级pip失败解决办法

    今天新买一个服务器,在上面安装了一个python3.5 用pip安装软件的时候发现...报错?说我的版本太低了 我一看,嚯pip版本才8.几 然后我就执行命令升级pip python -m pip i ...

最新文章

  1. GitHub上的“金矿”(236个Python开源项目,涵盖了15个领域)
  2. 通过yiic来创建yii应用
  3. 如何删除windows上面的jdk文件
  4. ActiveMQ简单使用介绍
  5. PAT甲级1136 A Delayed Palindrome :[C++题解]回文串和高精度并输出过程
  6. 深度学习之路孤单吗?我们带你进组织!
  7. java pdf电子签名_如何使用java在数字签名的pdf中添加空白页?
  8. chroma_format_idc表示的色度采样结构
  9. 复选框怎么点td选中_jQuery点击tr实现checkbox选中的方法
  10. [洛谷P3957] 跳房子
  11. Dcmtk在PACS开发中的应用(基础篇) 第二章 打印影像(胶片) 作者 冷家锋
  12. 用php循环星期一到星期日,php – 获取最后一个星期一 – 星期日的日期:有更好的方法吗?...
  13. 2000/XP系统蓝屏原因与解决
  14. MultiThread
  15. 支付1000元咨询费,如何让PB编写的程序不能被反编译?
  16. Django学习(二)
  17. 【ESP 保姆级教程】疯狂点灯篇 —— 案例:ESP8266 + LED + 按键 + 阿里云物联网平台 + 阿里云物联网Web应用 +自开发App控制(项目:我之家,包括所有源码)
  18. 你的伙伴对你最大会话_TeamViewer许可证对您与伙伴的最大会话有所限制解决办法...
  19. 阿里云国际版短信验证码及服务教程
  20. Cannot mix different versions of joi schemas报错解决方案

热门文章

  1. C语言编译全过程(转贴)
  2. 动态内存管理和智能指针 2.0 -- shared_ptr
  3. Mapping Persistence Classes 笔记2---ValueType的形式和映射
  4. WordCount扩展与优化
  5. Java 时间和日期类型的 Hibernate 映射
  6. python 之路,Day11 (下)- sqlalchemy ORM
  7. 内存管理器(二)边界标识法
  8. 银监会警示担保圈贷款风险 联保贷款变异 防多米诺效应
  9. indows上的android开发环境软件架构5
  10. linux proc/xx/maps文件分析