在Windows 7上添加Python路径 [英] Adding Python Path on Windows 7
问题描述
我一直在尝试在Windows 7上将Python路径添加到命令行中,但是无论我尝试哪种方法,似乎都没有任何效果.我使用过set
命令,我尝试通过编辑环境"变量提示符等添加它.
I've been trying to add the Python path to the command line on Windows 7, yet no matter the method I try, nothing seems to work. I've used the set
command, I've tried adding it through the Edit Environment variables prompt etc.
此外,如果我在命令行上运行set命令,它将列出此内容
Further more if I run the set command on the command line it lists this
python = c:\python27
但是它仍然无法识别Python命令.
Yet it still doesn't recognize the Python command.
阅读文档和其他各种资源似乎无济于事.
Reading the documentation, and various other sources hasn't seemed to help.
为进一步说明,我在编辑环境提示中将Python可执行文件的路径附加到PATH.似乎不起作用.
Just to clarify further, I've appended the path of the Python executable to PATH in edit environment prompt. Doesn't seem to work.
推荐答案
- 按住 Win 并按 Pause .
- 点击高级系统设置.
- 单击环境变量.
- 将
;C:\python27
附加到Path
变量. - 重新启动命令提示符.
- Hold Win and press Pause.
- Click Advanced System Settings.
- Click Environment Variables.
- Append
;C:\python27
to thePath
variable. - Restart Command Prompt.
这篇关于在Windows 7上添加Python路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!