在 Windows 上将 Python 添加到 PATH [英] Adding Python to PATH on Windows

查看:34
本文介绍了在 Windows 上将 Python 添加到 PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将 Python 路径添加到 Windows 的命令行中,但无论我尝试哪种方法,似乎都没有任何效果.我使用了 set 命令,我尝试通过编辑环境变量提示等添加它.

I've been trying to add the Python path to the command line on Windows, 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 命令,它会列出这个.

Furthermore, 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 haven't seemed to help.

为了进一步澄清,我已在编辑环境提示中将 Python 可执行文件的路径附加到 PATH.似乎不起作用.

Just to clarify further, I've appended the path of the Python executable to PATH in the Edit Environment prompt. Doesn't seem to work.

推荐答案

  1. 按住 Win 并按 暂停.
  2. 点击高级系统设置.
  3. 点击环境变量.
  4. ;C:python27 附加到 Path 变量.
  5. 重启命令提示符.
  1. Hold Win and press Pause.
  2. Click Advanced System Settings.
  3. Click Environment Variables.
  4. Append ;C:python27 to the Path variable.
  5. Restart Command Prompt.

这篇关于在 Windows 上将 Python 添加到 PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆