简体   繁体   English

在cmd中调用python 3.6而不是python 2.7

[英]calling python 3.6 in cmd instead of python 2.7

Whenever I try to run python 3.6 in cmd, I only get python 2.7. 每当我尝试在cmd中运行python 3.6时,我只会得到python 2.7。 I need both on my computer. 我的电脑上都需要。 I changed the PATH, I repaired python3.6, I tried moving it etc. 我更改了路径,修复了python3.6,尝试将其移动等。

I write "python" in cmd to call it but its always 2.7 even if it is not in the path anymore 我在cmd中写了“ python”来调用它,但它始终是2.7,即使它不在路径中了 在此处输入图片说明

To call python3 from an absolute path, you can use "C:\\Program Files\\Python36\\python.exe" . 要从绝对路径调用python3,可以使用"C:\\Program Files\\Python36\\python.exe" For example, "C:\\Program Files\\Python36\\python.exe" hello.py . 例如, "C:\\Program Files\\Python36\\python.exe" hello.py

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM