赞
踩
今天用virtualenv pip安装时报错
Package ‘setuptools’ requires a different Python: 2.7.12 not in ‘>=3.5’
谷歌了才发现由于python2.7停止维护了,setuptools>=45的版本都不再支持python2.7。
但 virtualenv的pip还是默认地安装了setuptools的最新版本,需要手动设置setuptools版本<45
在这里指定一下版本号重新安装setuptools即可
(ven27) wnj@wnj:~/venvs$ 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
后面再pip install其他包就不会报ERROR了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。