首页 > 解决方案 > gunicorn 与 python 3.8 不兼容

问题描述

作为学习 python 的一部分,我正在尝试使用 Conda创建一个带有 spyder、flask 和 gunicorn 的虚拟环境,但由于与 gunicorn 的兼容性问题而卡住了。任何人都可以在下面查看并建议前进的方向。

  1. 用python 3.9创建了一个虚拟环境并激活它

  2. 安装了烧瓶和 spyder - 一切正常。

  3. 尝试使用 安装 gunicorn conda install -c phumke gunicorn,但失败并出现以下错误。

    Collecting package metadata (repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: |
    Found conflicts! Looking for incompatible packages.
    This can take several minutes.  Press CTRL-C to abort./
    failed
    
    UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:
    
    Specifications:
    
    - gunicorn -> python=3.5
    
    Your python: python=3.8
    
    If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.
    
  4. 所以我删除了这个虚拟环境并用python 3.5版重新创建了它然后尝试再次安装spyder。但现在 spyder 失败如下。

     ERROR conda.core.link:_execute(700): An error occurred while installing package                 
     'defaults::ipykernel-4.10.0-py35_0'.
     Rolling back transaction: done
    
     LinkError: post-link script failed for package defaults::ipykernel-4.10.0-py35_0
    

我在 Windows 机器上的 Anaconda 提示符下执行所有这些操作。任何人都可以帮助解决这个问题吗?

标签: pythonanacondaspydergunicorn

解决方案


推荐阅读