![安装新版本的 Python 时 Conda 会挂起](https://linux22.com/image/1186033/%E5%AE%89%E8%A3%85%E6%96%B0%E7%89%88%E6%9C%AC%E7%9A%84%20Python%20%E6%97%B6%20Conda%20%E4%BC%9A%E6%8C%82%E8%B5%B7.png)
部分输出conda search python
如下:
# Name Version Build Channel
python 3.9.0 h2a148a8_4_cpython conda-forge
python 3.9.0 h852b56e_1_cpython conda-forge
python 3.9.0 h852b56e_2_cpython conda-forge
python 3.9.0 h852b56e_3_cpython conda-forge
python 3.9.0 hcff3b4d_1 pkgs/main
python 3.9.0 hdb3f193_2 pkgs/main
python 3.9.0 hffdb5ce_5_cpython conda-forge
python 3.9.1 hdb3f193_2 pkgs/main
python 3.9.1 hffdb5ce_0_cpython conda-forge
python 3.9.1 hffdb5ce_1_cpython conda-forge
python 3.9.1 hffdb5ce_2_cpython conda-forge
python 3.9.1 hffdb5ce_3_cpython conda-forge
python 3.9.1 hffdb5ce_4_cpython conda-forge
python 3.9.1 hffdb5ce_5_cpython conda-forge
python 3.9.2 hdb3f193_0 pkgs/main
python 3.9.2 hffdb5ce_0_cpython conda-forge
python 3.9.4 hdb3f193_0 pkgs/main
python 3.9.4 hffdb5ce_0_cpython conda-forge
python 3.9.5 h12debd9_4 pkgs/main
python 3.9.5 h49503c6_0_cpython conda-forge
python 3.9.5 hdb3f193_3 pkgs/main
python 3.9.6 h12debd9_0 pkgs/main
python 3.9.6 h12debd9_1 pkgs/main
python 3.9.6 h49503c6_0_cpython conda-forge
python 3.9.6 h49503c6_1_cpython conda-forge
python 3.9.7 h12debd9_1 pkgs/main
python 3.9.7 h49503c6_0_cpython conda-forge
python 3.9.7 hb7a2778_1_cpython conda-forge
python 3.9.7 hb7a2778_2_cpython conda-forge
python 3.9.7 hb7a2778_3_cpython conda-forge
python 3.9.7 hf930737_3_cpython conda-forge
python 3.9.9 h543edf9_0_cpython conda-forge
python 3.9.9 h62f1059_0_cpython conda-forge
python 3.9.10 h85951f9_0_cpython conda-forge
python 3.9.10 h85951f9_1_cpython conda-forge
python 3.9.10 h85951f9_2_cpython conda-forge
python 3.9.10 hc74c709_0_cpython conda-forge
python 3.9.10 hc74c709_1_cpython conda-forge
python 3.9.10 hc74c709_2_cpython conda-forge
当我这样做时,conda install python=3.9 --channel conda-forge
我得到:
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: \
它只是挂在那里。该怎么办?
答案1
解决方法是创建并激活一个新的虚拟环境conda
:
conda create --name workaround
conda activate workaround
workaround
在上面的例子中,我使用了新环境的名称,但您可以使用任何您想要的名称。