python2.7-pip-版本升级后pip-list-报错
目录
python2.7 pip 版本升级后pip list 报错
情景描述:
我要使用python2.7 去安装个包,但是默认下载后安装的python中的pip版本是8.0.1的版本,需要升级。但是一升级过后,输入pip list 直接报错,只能卸载重装
原因分析 : 是因为python放弃了2.7的版本,不支持了。只能安装21.0 版本之下的
DEPRECATION: Python 2.7 reached the end of its life on January 1st,
- Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021.
More details about Python 2 support in pip can be found at
pip 21.0 will remove support for this functionality.
解决方案:
easy_install pip==20.3.4
还有一种方法,开启管理员权限去升级