首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pyomo.extra安装失败

Pyomo.extra安装失败
EN

Stack Overflow用户
提问于 2022-09-11 14:41:40
回答 1查看 84关注 0票数 1

我从头到尾安装了Anaconda,然后安装了pyomo,它起作用了。

当我尝试安装pyomo.extra时,它运行大约1/2小时,然后失败。我试过:

  • conda安装-c conda-伪造pyomo.extras
  • conda install -c“conda-forge/label/-c 201901”pyomo.extras
  • conda install -c“conda-forge/label/ on 202003”pyomo.extrashttps://anaconda.org/conda-forge/pyomo.extras上推荐的那样

而且还

conda配置--添加通道conda- conda安装pyomo.extras

随后与

conda搜索pyomo.extras -通道conda-forge

正如https://github.com/conda-forge/pyomo.extras-feedstock所建议的那样

指示没有安装pyomo.extra。

这是生成的输出。

代码语言:javascript
复制
(base) PS C:\WINDOWS\system32> conda install pyomo.extras
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.
Examining conflict for pyomo.extras:  75%|███████████████████████████████████▎           | 3/4 [00:03<00:01,  1.15s/it]\failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - pyomo.extras -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.4.*']

Your python: python=3.9

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 system:

  - feature:/win-64::__win==0=0
  - feature:|@/win-64::__win==0=0
  - pyomo.extras -> ipython -> __osx
  - pyomo.extras -> ipython -> __win

Your installed version is: 0


(base) PS C:\WINDOWS\system32> conda search pyomo.extras --channel conda-forge
Loading channels: -
(base) PS C:\WINDOWS\system32>

问题:

  • pyomo.extra安装失败的原因可能是什么?
  • 可以重新推荐哪些安装pyomo.extra的替代方案?
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-09-12 01:15:32

这个包只适用于Python2.7、3.6和3.7,但您的目标环境目前有Python3.9。Conda不会更改Python版本,因为它需要更改环境中的几乎每个包。相反,尝试创建一个兼容Python版本的新环境。

代码语言:javascript
复制
## include any other packages now
conda create --name foo python=3.7 pyomo pyomo.extras

为什么只有旧版本?从Python3.8以来,原料存储库一直未能构建更新的版本,而且没有任何维护人员介入来修复它。如果您希望看到更新版本的构建,那么就将问题放在原料上,或者,如果您想要修复它,请发送拉扯请求。吱吱作响的轮子是油!

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

https://stackoverflow.com/questions/73680168

复制
相关文章

相似问题

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