【问题标题】:Using Python from a command window: Setting the PATH variable on Windows 8: Picture Provided从命令窗口使用 Python:在 Windows 8 上设置 PATH 变量:提供的图片
【发布时间】:2014-08-16 09:48:50
【问题描述】:

目前只有这样有效:

设置路径=C:\Python34

但每次打开 cmd 时都必须这样做。

我正在尝试设置一个永久变量

我尝试按照以下步骤操作,但我没有变量“路径”,因此我无法单击对其进行编辑。请看图片屏幕截图。任何帮助将不胜感激。谢谢。

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

【问题讨论】:

  • 有任何 Python 大师可以帮助解决这个问题吗?

标签: python variables path cmd


【解决方案1】:

如果您想为计算机上的所有用户配置 Python (通过更改 System 环境变量),只需单击几下即可向上滚动。 变量按名称的字母顺序列出, 所以 PATH 应该比 PSModulePath 高几个档位。 (请注意,修改系统环境变量需要您具有管理员权限。) 或者,如果您没有特权,或者您只需要为自己设置, 创建一个用户变量 通过单击“Roo 的用户变量”部分(下方)中的“新建...”。 输入名称为PATH,值输入为C:\Python34。 如果将来需要将其他目录添加到 PATH, 用分号隔开, 例如,C:\Python34;C:\Cobra42;C:\Panda17

【讨论】:

    【解决方案2】:

    您需要在系统变量部分编辑路径变量。将以下内容添加到变量值的末尾:

    C:\Python34\;C:\Python34\Scripts;

    【讨论】:

      猜你喜欢
      • 2013-06-26
      • 2013-09-08
      • 1970-01-01
      • 2021-06-22
      • 1970-01-01
      • 1970-01-01
      • 2015-02-07
      • 2011-08-07
      • 2018-11-02
      相关资源
      最近更新 更多