有时候你想更换自己在某个虚拟环境中的python版本,怎么做呢?如果用pip install python==3.8之类的语句进行安装,通常会遇到如下失败:

ERROR: Could not find a version that satisfies the requirement python==3.8 (from versions: none)
ERROR: No matching distribution found for python==3.8

这个时候如果我们的虚拟环境是由anaconda3来管控的,那这个时候要修改其实很方便,只需输入如下指令:

conda install python==3.8 -n "指定虚拟环境的名字"

即可更改该虚拟环境的python版本。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐