我正在尝试在Python中使用Gurobi。作为一个集成开发环境,我使用PyCharm。当我使用通过PyCharm安装gurobipy时,我收到以下错误。

如this link所示,我还尝试通过Anaconda安装库。但是,我收到另一个错误,如下所示。
(base) C:\Users\...>conda install -c gurobi gurobi
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
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:
- gurobi -> python[version='2.7.*|3.5.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.4.*']
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.
The following specifications were found to be incompatible with your CUDA driver:
- feature:/win-64::__cuda==11.0=0
- feature:|@/win-64::__cuda==11.0=0
Your installed CUDA driver is: 11.0我有Gurobi 9.0.2的学术版,并在Windows 10中使用Python 3.8.3。我想知道怎样才能解决这个问题。
发布于 2020-08-17 05:19:36
我无法评论,但似乎您正在使用的python版本与gurobipy库/包不兼容。您可能希望使用Python3.7创建一个新的conda环境,并尝试将gurobipy库下载到该conda环境中。下面是执行此https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html操作的参考
https://stackoverflow.com/questions/63441997
复制相似问题