在Windows 10 cmd中的不同Python版本之间切换

问题描述:

我不喜欢其他帖子. 因为它涉及重命名python可执行文件.

I don't like the other post. because it involves renaming python executables.

我认为支持各种版本的Python以及其他语言的最简单方法是asdf版本管理器.它允许您在每个项目文件夹中全局设置Python版本.这意味着您可以将Python版本设置为根据正在使用的文件夹动态更改.

I think the easiest way to support various versions of Python, as well as other languages, is the asdf version manager. It allows you to set a version of Python globally, as well as in each project folder. This means that you can set your Python version to dynamically change based upon the folder you're working in.

asdf版本管理器

我已经有20年没有使用Windows了,但是我听说Windows 10支持Linux的基于Ubuntu的子系统.我不知道asdf是否可以解决该问题,但是值得一试.只需按照使用bash设置asdf的说明进行操作即可.

I haven't used Windows for almost 20 years, but I've heard that Windows 10 sports an Ubuntu-based subsystem for Linux. I don't know if asdf will work with that, but it is worth a try. Just use the instructions for setting asdf up with bash.