在命令窗口中使用Python:Windows 8设置PATH变量(附图)
现在只有这个方法有效:
set path=C:\Python34
但是每次打开命令提示符(cmd)都得重新设置一次。
我想设置一个永久的变量。
我尝试按照下面的步骤操作,但我没有找到“Path”这个变量,所以无法点击编辑。请看一下截图。任何帮助都会很感激。谢谢。
http://postimg.org/image/i8z8y8wcv/
press Start
select Control Panel
On the Control Panel window, in the left column, press Switch to classic view (If you don't see this text, go to the next step below.)
Double click on the icon for System
In the System window, click on Advanced
Click on the button Environment Variables
In the new window, scroll until you see the variable, Path; click on it
Press Edit
Carefully use the right arrow button to move to the end of the long sequence of folder names. At the very end, without including any extra blanks, type this:
;C:\Python24
2 个回答
0
如果你想为电脑上的所有用户配置Python(也就是修改系统环境变量),只需要向上滚动几下。环境变量是按名字的字母顺序排列的,所以你会发现PATH就在PSModulePath的上面几行。
(注意,修改系统环境变量需要你有管理员权限。)
或者,如果你没有管理员权限,或者只想为自己设置,可以在“用户变量”部分点击“新建…”来创建一个新的用户变量。
把名字填为PATH
,值填为C:\Python34
。
如果将来你需要在PATH中添加其他目录,可以用分号来分隔,比如C:\Python34;C:\Cobra42;C:\Panda17
。
3
你需要在系统变量的部分修改路径变量。在变量值的最后添加以下内容:
C:\Python34\;C:\Python34\Scripts;