我从头到尾安装了Anaconda,然后安装了pyomo,它起作用了。
当我尝试安装pyomo.extra时,它运行大约1/2小时,然后失败。我试过:
而且还
conda配置--添加通道conda- conda安装pyomo.extras
随后与
conda搜索pyomo.extras -通道conda-forge
正如https://github.com/conda-forge/pyomo.extras-feedstock所建议的那样
指示没有安装pyomo.extra。
这是生成的输出。
(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>问题:
发布于 2022-09-12 01:15:32
这个包只适用于Python2.7、3.6和3.7,但您的目标环境目前有Python3.9。Conda不会更改Python版本,因为它需要更改环境中的几乎每个包。相反,尝试创建一个兼容Python版本的新环境。
## include any other packages now
conda create --name foo python=3.7 pyomo pyomo.extras为什么只有旧版本?从Python3.8以来,原料存储库一直未能构建更新的版本,而且没有任何维护人员介入来修复它。如果您希望看到更新版本的构建,那么就将问题放在原料上,或者,如果您想要修复它,请发送拉扯请求。吱吱作响的轮子是油!
https://stackoverflow.com/questions/73680168
复制相似问题