简体   繁体   English

Python - 在Windows上设置python路径的更快方法?

[英]Python - Faster way to set python path on windows?

When you install python on windows, you have to set the path by going to the Environment Variables , then click New , enter the name, then in the value place enter the path, finally edit the path and add %pythonexe%; 当您在Windows上安装python时,您必须通过转到Environment Variables来设置路径,然后单击New ,输入名称,然后在value位置输入路径,最后编辑路径并添加%pythonexe%; to it. 它。 When you do this, you can type python and you will get the python shell. 当你这样做,你可以键入python ,你将获得python shell。 Is there an easier way to do this without having to go to the system variables, and doing all that stuff? 是否有一种更简单的方法来做到这一点,而不必去系统变量,并做所有这些?

根据这篇文章,你所要做的就是在Command Prompt

 setx path "%path%;C:\\Python27;" 

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

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