我miniconda通過choco install miniconda3.
創建 python3 環境可以正常作業。
conda create --name envA python=3 --verbose
但是創建python2環境有問題。
conda create --name envB python=2 --verbose
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working...
Found conflicts! Looking for incompatible packages.
failed
Traceback (most recent call last):
...
File "C:\Users\fred\miniconda3\lib\site-packages\conda\resolve.py", line 352, in find_conflicts
raise UnsatisfiableError(bad_deps, strict=strict_channel_priority)
conda.exceptions.UnsatisfiableError
uj5u.com熱心網友回復:
@cel 對此表示贊賞
切換到 mamba 提供了更好的診斷。
mamba create -n foo python=2
Looking for: ['python=2']
conda-forge/win-64 Using cache
conda-forge/noarch Using cache
Encountered problems while solving:
- nothing provides vc 9.* needed by python-2.7.12-0
然后使用 mamba 查找vc.
mamba search vc
# Name Version Build Channel
vc 14.1 h21ff451_1 conda-forge
vc 14.1 h6d1b3ff_2 conda-forge
...
vc v9可以在頻道defaults中找到。
mamba search 'vc[channel=defaults]'
# Name Version Build Channel
vc 9 h2eaa2aa_6 pkgs/main
...
.condarc用defaults頻道更新,更正了問題。
channels:
- conda-forge
- defaults
channel_priority: disabled
最后一點,如果其他人發現自己處于這種情況......
作為安裝的一部分進行~/.condarc了更改(洗掉了defaults頻道)mambaforge。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/461235.html
標籤:python-2.7 康达 巧克力
