Python|setuptools错误一例


随着python2.7的即将退出历史舞台,在ubuntu18.04上pip install pyenv竟然提示 Package 'setuptools' requires a different Python: 2.7.12 not in '>=3.5'

原因就是setuptools>=45的版本都不再支持python2.7
所以解决办法也很简单,降级setuptools

pip install setuptools==44.0.0
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting setuptools==44.0.0
  Downloading setuptools-44.0.0-py2.py3-none-any.whl (583 kB)
     |████████████████████████████████| 583 kB 7.1 kB/s 
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 45.0.0
    Uninstalling setuptools-45.0.0:
      Successfully uninstalled setuptools-45.0.0
Successfully installed setuptools-44.0.0

然后就顺利了

转载请注明: 转自Rainbird的个人博客
   本文链接: Python|setuptools错误一例


相关博文

About rainbird

IOS攻城狮
This entry was posted in Python and tagged , , , , , . Bookmark the permalink.

发表评论