是否有办法将当前Python 3.8.11的conda基(根)环境更新到Python 3.9或3.10?我知道使用一个新的虚拟环境是推荐的方法,但我仍然想学习如何去做。
我试着使用conda install python=3.9
和conda install python=3.10
,推荐的几篇文章几年前,但他们没有工作和我结束了以下错误
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
另外,使用conda update python
只改变了微版本号(我认为它从Python 3.8.10升级到3.8.11)
根据你的错误信息你不能将conda base升级到python 3.10,因为这会导致不兼容. (据说numpy包有一些问题。)所以你必须等待下一个Anaconda版本。
然而,conda的重点是使用虚拟环境:
conda create --name py10 python=3.10
这允许您安装Python 3.10。
只管做
conda update python
和你应该没事。如果你想使用3.10,你可以使用conda install python="3.10"
。
这将更新您当前的环境版本