首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Python设置Gurobi

使用Python设置Gurobi
EN

Stack Overflow用户
提问于 2020-08-17 05:14:24
回答 1查看 374关注 0票数 0

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

this link所示,我还尝试通过Anaconda安装库。但是,我收到另一个错误,如下所示。

代码语言:javascript
复制
(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。我想知道怎样才能解决这个问题。

EN

回答 1

Stack Overflow用户

发布于 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操作的参考

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63441997

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档