假设你的电脑有python 3.11.4和python 3.10.6等多个版本,现在cmd默认的是python 3.11.4,想修改成默认python 3.10.6,可以先在cmd输入:
where python
假设它返回如下结果:
C:\Users\123\anaconda3\python.exe
C:\Users\123\AppData\Local\Programs\Python\Python310\python.exe
C:\Users\123\AppData\Local\Microsoft\WindowsApps\python.exe
这里C:\Users\123\anaconda3\python.exe是python 3.11.4,而C:\Users\123\AppData\Local\Programs\Python\Python310\python.exe是python 3.10.6,这样就可以执行如下命令把默认版本修改成python 3.10.6
setx PATH "C:\Users\123\AppData\Local\Programs\Python\Python310;%PATH%"
Please remember our website: da-huang.com
Comments