ERROR: Package 'gunicorn' requires a different Python: 2.7.5 not in '>=3.4'

pip安装gunicorn时出现这个错:

Collecting gunicorn (from -r requirements.txt (line 9))
  Downloading http://pypi.doubanio.com/packages/69/ca/926f7cd3a2014b16870086b2d0fdc84a9e49473c68a8dff8b57f7c156f43/gunicorn-20.0.4-py2.py3-none-any.whl (77kB)
     |████████████████████████████████| 81kB 5.3MB/s 
ERROR: Package 'gunicorn' requires a different Python: 2.7.5 not in '>=3.4'

因为错误原因在于不指定版本就会安装最新的版本的,目前我使用的python2.7,因为此项目需要2.7.不然也想python3

看一下gunicorn版本:

[root@node00 quotesys]# pip install gunicorn==999
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. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: http://pypi.douban.com/simple
Collecting gunicorn==999
  ERROR: Could not find a version that satisfies the requirement gunicorn==999 (from versions: 0.1, 0.2, 0.2.1, 0.3, 0.3.1, 0.3.2, 0.4, 0.4.1, 0.4.2, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.7.0, 0.7.1, 0.7.2, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.12.2, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.4, 0.14.5, 0.14.6, 0.15.0, 0.16.0, 0.16.1, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 17.5, 18.0, 19.0.0, 19.1.0, 19.1.1, 19.2.0, 19.2.1, 19.3.0, 19.4.0, 19.4.1, 19.4.2, 19.4.3, 19.4.4, 19.4.5, 19.5.0, 19.6.0, 19.7.0, 19.7.1, 19.8.0, 19.8.1, 19.9.0, 19.10.0, 20.0.0, 20.0.2, 20.0.3, 20.0.4)
ERROR: No matching distribution found for gunicorn==999

这里的999随便设置什么数字,只为了设置不正确的版本让提示我们应该正确安装的版本

看来上面的数字,我安装了一个较中间的版本,

[root@node00 quotesys]# pip install gunicorn==0.14.0
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. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: http://pypi.douban.com/simple
Collecting gunicorn==0.14.0
  Downloading http://pypi.doubanio.com/packages/ec/cf/5deb43f429e0918cfd0ddbc67d42acb8c909925f595cb2fca447df3ba242/gunicorn-0.14.0.tar.gz (203kB)
     |████████████████████████████████| 204kB 1.7MB/s 
Installing collected packages: gunicorn
  Running setup.py install for gunicorn ... done
Successfully installed gunicorn-0.14.0

搞定了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值