Python的环境路径不工作? [英] Environmental path to Python not working?

查看:166
本文介绍了Python的环境路径不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将Python 3.4安装到新的PC上。 Python工作,但我正试图让点工作在这一点上。我已经做了一个Python的路径,这在下面。

  C:\Python34\python.exe 

当我运行下面的代码

  C:\Windows\ System32> pip install python-docx 


'python'不被识别为内部或外部命令,
可操作的程序或批处理文件。


解决方案

似乎您尚未配置 PATH 变量正确。为了这样做:




  • 按住Win键,然后按暂停。

  • 点击高级系统设置

  • 单击环境变量。

  • 追加; C:\Python34

  • 重新启动命令提示



(您也可以运行 cmd c>)



有关更多信息,请访问官方Python安装指南Windows


I have Installed Python 3.4 onto a new PC. Python works but I am trying to get pip to work on this. I have made a path for Python which is below.

C:\Python34\python.exe

When i run the below code

C:\Windows\System32>pip install python-docx


'python' is not recognized as an internal or external command,
operable program or batch file.

解决方案

It seems that you haven't configured your PATH variable correctly. In order to do so:

  • Hold down the Win key and press Pause.
  • Click Advanced System Settings.
  • Click Environment Variables.
  • Append ;C:\Python34 to the PATH variable.
  • Restart Command Prompt.

(You may also just run set PYTHONPATH=%PYTHONPATH%;C:\Python34 in the cmd)

Further information is available in The Official Python Installation Guide for Windows.

这篇关于Python的环境路径不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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