Hello World程序员

Python2环境的PIP升级到10.0.3版本后使用pip命令

2018-07-08  本文已影响0人  Comclay

在Centos6中默认安装的版本是python2.6,升级pip后就会导致pip命令无法使用,具体原因如下:

If you’re attempting to upgrade the version of PIP on CentOS or RHEL 6 from the default 7.1.0 to a newer version, as of April 14th 2018 when PIP 10.0.0 was released you will run into issues since EL6 ships with Python 2.6 as standard. Since you cannot upgrade the default version of Python because it will break in-built tooling such as Yum, you’ll need to version lock PIP when you upgrade it to 9.0.3. This is the last stable version of PIP that is compatible with Python 2.6

为了解决这个问题比较直接的办法就是重新安装PIP工具:

https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
tar -xzvf pip-9.0.1.tar.gz
cd pip-9.0.1
python setup.py install

参考资料:

上一篇 下一篇

猜你喜欢

热点阅读