当前位置:   article > 正文

ERROR: Package 'gunicorn' requires a different Python: 2.7.5 not in '>=3.4'_error: package 'xmltodict' requires a different py

error: package 'xmltodict' requires a different python: 2.7.5 not in '>=3.4

pip安装gunicorn时出现这个错:

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

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

看一下gunicorn版本:

  1. [root@node00 quotesys]# pip install gunicorn==999
  2. 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
  3. Looking in indexes: http://pypi.douban.com/simple
  4. Collecting gunicorn==999
  5. 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)
  6. ERROR: No matching distribution found for gunicorn==999

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

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

  1. [root@node00 quotesys]# pip install gunicorn==0.14.0
  2. 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
  3. Looking in indexes: http://pypi.douban.com/simple
  4. Collecting gunicorn==0.14.0
  5. Downloading http://pypi.doubanio.com/packages/ec/cf/5deb43f429e0918cfd0ddbc67d42acb8c909925f595cb2fca447df3ba242/gunicorn-0.14.0.tar.gz (203kB)
  6. |████████████████████████████████| 204kB 1.7MB/s
  7. Installing collected packages: gunicorn
  8. Running setup.py install for gunicorn ... done
  9. Successfully installed gunicorn-0.14.0

搞定了

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/570211
推荐阅读
相关标签
  

闽ICP备14008679号