我试图在Python
中使用Gurobi
。作为一个IDE,我使用PyCharm
。当我使用安装gurobipy
到PyCharm
时,我收到以下错误
我还尝试通过Anaconda
安装库,如this link所示。但是,我收到另一个错误,如下所示
(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
。我想知道如何解决这个问题
我无法发表评论,但您使用的python版本似乎与gurobipy库/包不兼容。您可能希望使用Python 3.7创建一个新的conda环境,并尝试将gurobipy库下载到该conda环境中。下面是执行此操作的参考https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
相关问题 更多 >
编程相关推荐