本文翻译自:'pip' is not recognized as an internal or external command

I'm running into a weird error trying to install Django on my computer. 我在尝试在计算机上安装Django时遇到了一个奇怪的错误。

This is the sequence that I've typed into my command line: 这是我在命令行中键入的序列:

C:\Python34>python get-pip.py
Requirement already up-to-date: pip in c:\python34\lib\site-packages
Cleaning up...C:\Python34>pip install Django
'pip' is not recognized as an internal or external command,
operable program or batch file.C:\Python34>lib\site-packages\pip install Django
'lib\site-packages\pip' is not recognized as an internal or external command,
operable program or batch file.

What could be causing this? 是什么原因造成的?

EDIT ___________________ 编辑___________________

As requested this is what I get when I type in echo %PATH% 根据要求,这是我输入echo%PATH%时得到的结果

C:\Python34>echo %PATH%
C:\Program Files\ImageMagick-6.8.8-Q16;C:\Program Files (x86)\Intel\iCLS Client\
;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\S
ystem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\
Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Progr
am Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Mana
gement Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine C
omponents\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components
\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\P
rogram Files (x86)\nodejs\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x
86)\git\cmd;C:\RailsInstaller\Ruby2.0.0\bin;C:\RailsInstaller\Git\cmd;C:\RailsIn
staller\Ruby1.9.3\bin;C:\Users\Javi\AppData\Roaming\npm

#1楼

参考:https://stackoom.com/question/1BtLA/pip-不被识别为内部或外部命令


#2楼

refer the ENV path setting up : http://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/ make sure the env path is added correctly, for 2.7-"c:\\Python27\\Scripts;" 请参阅ENV路径设置: http : //www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/确保环境路径为2.7-“ c:\\ Python27 \\ Scripts”正确添加了

refer Get Pip section : http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/ 请参阅“获取Pip”部分: http : //www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/

make use of these resources.this will solve issue for you 利用这些资源。这将为您解决问题


#3楼

You need to add the path of your pip installation to your PATH system variable . 您需要将pip安装的路径添加到PATH系统变量中 By default, pip is installed to C:\\Python34\\Scripts\\pip (pip now comes bundled with new versions of python), so the path "C:\\Python34\\Scripts" needs to be added to your PATH variable. 默认情况下,pip安装到C:\\Python34\\Scripts\\pip (pip现在与新版本的python捆绑在一起),因此,路径“ C:\\ Python34 \\ Scripts”需要添加到PATH变量中。

To check if it is already in your PATH variable, type echo %PATH% at the CMD prompt 要检查它是否已经在PATH变量中,请在CMD提示符下键入echo %PATH%

To add the path of your pip installation to your PATH variable , you can use the Control Panel or the setx command. 要将pip安装的路径添加到PATH变量中 ,可以使用控制面板或setx命令。 For example: 例如:

setx PATH "%PATH%;C:\Python34\Scripts"

Note : According to the official documentation , "[v]ariables set with setx variables are available in future command windows only, not in the current command window". 注意 :根据官方文档 ,“使用setx变量设置的[v]变量仅在以后的命令窗口中可用,而在当前命令窗口中不可用”。 In particular, you will need to start a new cmd.exe instance after entering the above command in order to utilize the new environment variable. 特别是,输入上述命令后, 您将需要启动一个新的cmd.exe实例 ,以利用新的环境变量。

Thanks to Scott Bartell for pointing this out. 感谢Scott Bartell指出这一点。


#4楼

For me command: 对我来说:

set PATH=%PATH%;C:\Python34\Scripts

worked immediately (try after echo %PATH% and you will see that your path has the value C:\\Python34\\Scripts). 立即工作(在echo%PATH%之后尝试,您将看到路径值为C:\\ Python34 \\ Scripts)。

Thanks to: https://stackoverflow.com/a/9546345/1766166 感谢: https : //stackoverflow.com/a/9546345/1766166


#5楼

Even I'm new to this but, C:\\Python34\\Scripts>pip install django ,worked for me. 甚至我都不熟悉,但是C:\\ Python34 \\ Scripts> pip install django为我工作。 The path should be set as where the Script folder of Python installation is ie C:\\Python34\\Scripts . 路径应设置为Python安装的Script文件夹所在的位置,即C:\\ Python34 \\ Scripts 。 I suppose its because django is a framework which is based on python that's why this directory structure has to be maintained while installing. 我想这是因为django是一个基于python的框架,这就是为什么在安装时必须维护此目录结构的原因。


#6楼

I think from Python 2.7.9 and higher pip comes pre installed and it will be in your scripts folder. 我认为从Python 2.7.9及更高版本开始,预安装了pip,它将位于您的scripts文件夹中。 So you have to add the "scripts" folder to the path. 因此,您必须将“ scripts”文件夹添加到路径。 Mine is installed in C:\\Python27\\Scripts. 我的被​​安装在C:\\ Python27 \\ Scripts中。 Check yours to see what your path is so that you can alter the below accordingly, then Go to powershell, paste the below code in powershell and hit Enter key. 检查您的路径,以便可以相应地更改以下内容,然后转到powershell,将以下代码粘贴到powershell中,然后按Enter键。 After that, reboot and your issue will be resolved. 之后,重新启动,您的问题将得到解决。

[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\Scripts", "User")

#39;pip#39;不被识别为内部或外部命令相关推荐

  1. python中pip不是内部或外部命令_‘pip’不被识别为内部或外部命令。

    'pip'不被识别为内部或外部命令. 我在我的电脑上安装Django时遇到了一个奇怪的错误. 这是我在命令行中输入的序列:C:\Python34>python get-pip.pyRequire ...

  2. 解决'python -m pip install --upgrade pip',显示“'python' 不是内部或外部命令,也不是可运行的程序”

    我们在用pip 安装某个库后可能会显示这样的语句. 这是提示你升级你的pip. 可是当我们在按照它的提示输入'python -m pip install --upgrade pip' 后却出现这样的情 ...

  3. php.exe不是内部或外部命令,“php.exe”不被识别为内部或外部命令,可操作程序或batch file...

    我想你需要将它更改为A:\ xampp \ php \,然后将它放在那里,然后它将search该文件的目录,还有:您是否尝试过调用php而不是php.exe,并检查目录是正确. A:\xampp\ph ...

  4. pycharm的terminal无法识别到命令 pytest 不是内部或外部命令,也不是可运行的程序 或批处理文件。

    'pytest' 不是内部或外部命令,也不是可运行的程序或批处理文件. 在Pycharm中运行python或者pip或者pytest命令都没有反应,但是在cmd下运行正常. 原因:Pycharm创建的 ...

  5. 安装需要的第三方库时,命令行输入pip提示不是内部或外部命令

    简介 在做Python开发时,安装需要的第三方库时,大多数人喜欢选择在命令行用pip进行安装. 然而有时敲入pip命令会提示'pip'不是内部或外部命令..如图: 解决办法 1.在python安装目录 ...

  6. Python 技术篇-pip安装提示:‘pip‘ 不是内部或外部命令,也不是可运行的程序或批处理文件,问题解决方法

    问题展示: 之前还是好的,现在就不能用了. C:\Users\Administrator>pip 'pip' 不是内部或外部命令,也不是可运行的程序或批处理文件. 解决方法: 首先我们在 pyt ...

  7. python通过pip安装包,提示 pip 不是内部或外部命令

    pip是python自带的一个用于安装python包的工具,比如安装word文档库,执行 pip install python-docx 但运行中出现一下报错,pip不是内部或外部命令 问题在于在你执 ...

  8. 成功解决‘pip‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件

    成功解决'pip' 不是内部或外部命令,也不是可运行的程序 或批处理文件 目录 解决问题 解决方法 1.图文教程 解决问题 'pip' 不是内部或外部命令,也不是可运行的程序 或批处理文件. 解决方法 ...

  9. 解决'pip' 不是内部或外部命令,也不是可运行的程序或批处理文件的问题

    大家好,我是Connor,今天我为大家带来解决CMD命令无法直接运行 '点子' 进行安装库的问题. 今天本来想安装库来着,但是苦于pycharm的设置里不知道出了什么原因,无奈只能使用PIP功能来安装 ...

最新文章

  1. 网站推广——网站推广专员浅析企业网站验收和交付要注意哪些问题
  2. OpenStack Neutron浅析(三)
  3. Kali渗透测试技术实战
  4. 我在斯坦福做科研的碎碎念
  5. C++:构造函数的重载
  6. 猫影视接口相关及短网址
  7. ES10新特性_字符串扩展方法_trimStart--trimEnd---JavaScript_ECMAScript_ES6-ES11新特性工作笔记058
  8. php基础之常量(系统常量,自定义常量)
  9. latex 生成pdf显示行号
  10. vbox安装深度linux,win10系统上用VirtualBox虚拟机安装国产深度deepin系统教程
  11. 《Pajek社会网络探索性分析》书籍简介
  12. Js 中null 和underfined的区别
  13. 服务器ip映射端口,一个公网IP对应多台服务器端口映射问题
  14. 哈利波特与死圣中文版
  15. 07.尚硅谷网课7-实战练习
  16. “丧偶式”恋爱?博士男友每晚12点才回家,要分手吗......
  17. TLD 源码详解(一)--- TLD的编译和运行
  18. 数据库系统-关系模式
  19. shell中的脚本测试
  20. 如何解决百度云下载慢的问题

热门文章

  1. 金山WPS支持xlookup了?亲自上手实战好不好用。
  2. 浙江湖州市工程师职称评审条件和流程
  3. 机器学习入门之7种经典回归模型
  4. 反转每对括号间的子串 c语言,1190. 反转每对括号间的子串
  5. ttf字体库裁剪工具制作与使用
  6. Scala系列-3、scala中的类和对象有哪些?
  7. iOS获取WiFi名字
  8. C语言实现巧妙推算走楼梯
  9. dedecms教程:织梦仿站常用标签集合
  10. 公众号客服消息如何跳转小程序和h5