当前位置:网站首页>How mysterious is "PIP not an internal or external command, nor a runnable program or batch file"
How mysterious is "PIP not an internal or external command, nor a runnable program or batch file"
2022-06-12 19:40:00 【Huawei cloud developer community】
This article is shared from Huawei cloud community 《 uncover 「pip Not an internal or external command , Nor are they runnable programs or batch files 」 The veil of mystery 》, author :AXYZdong.
Preface
pip Not an internal or external command , Nor are they runnable programs or batch files How mysterious it is ?
Don't experience it , How do you know ? Bloggers have recently experienced .
Originally wanted to use pip install How many bags , Then it reminded me pip The package needs to be updated , I'll update it , But after the update , Reuse pip install The following will happen when :

Have a problem , Of course, bloggers go to Baidu the first time .
Baidu search feedback : It is found that the articles on this issue have a feature
- Single solution , His problems may not be the same as yours , A single approach is not universal
For the above problems
- This article will be from multiple perspectives 、 Comprehensive interpretation and analysis , There must be a solution for you .
One 、 Uncover the mystery
1、Scripts Folder not added to environment variable
【 resolvent 】
1. Find yourself python Installation directory
Bloggers : C:\Users\24144\AppData\Local\Programs\Python

2. Add environment variables
As shown in the figure , As long as Python Under folder Scripts Add the folder to the path environment variable and refer to its screenshot , To add the corresponding environment variable : C:\Users\24144\AppData\Local\Programs\Python\ Scripts To Path Go to... In environment variable , Because the change path contains the corresponding PIP Program , So it's easy to solve PIP Unable to run the problem. Right click : This computer - > attribute - > Advanced system setup - > senior - > environment variable - > route - > modify , After adding successfully, you can run .

Actually in Python The installation interface of will Python Options added to environment variables

2、Scripts Nothing in the folder pip package
Be sure to look under the installation directory Scripts Is there any in the folder pip package
If not ,win + R , open cmd command , Input
<span style="background-color:#2d2d2d"><span style="color:#cccccc"><code class="language-c">easy_install pip
</code></span></span>You can reinstall .
Bloggers are updating pip after ,Scripts There is no... In the folder pip It's packed .
After installation Scripts It should be like this in the folder :

attach :pip Package download address
Two 、 The story behind the veil
pip Possible problems with updates
Input pip install openpyxl, The update prompt appears ( notes :openpyxl It's a kind of bag )
<span style="background-color:#2d2d2d"><span style="color:#cccccc"><code class="language-c">C<span style="color:#67cdcc">:</span>\Users\<span style="color:#f08d49">24144</span>\AppData\Local\Programs\Python\Python37\Scripts<span style="color:#67cdcc">></span>pip install openpyxl
Collecting openpyxl
Using cached https<span style="color:#67cdcc">:</span><span style="color:#999999">//files.pythonhosted.org/packages/1c/5d/e9087edae37ed185e883c9ec727215caba8b4044a8111ff033ebad85e508/openpyxl-3.0.1.tar.gz</span>
Collecting <span style="color:#f08d49">jdcal</span> <span style="color:#cccccc">(</span>from openpyxl<span style="color:#cccccc">)</span>
Using cached https<span style="color:#67cdcc">:</span><span style="color:#999999">//files.pythonhosted.org/packages/f0/da/572cbc0bc582390480bbd7c4e93d14dc46079778ed915b505dc494b37c57/jdcal-1.4.1-py2.py3-none-any.whl</span>
Collecting <span style="color:#f08d49">et_xmlfile</span> <span style="color:#cccccc">(</span>from openpyxl<span style="color:#cccccc">)</span>
Using cached https<span style="color:#67cdcc">:</span><span style="color:#999999">//files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz</span>
Installing collected packages<span style="color:#67cdcc">:</span> jdcal<span style="color:#cccccc">,</span> et<span style="color:#67cdcc">-</span>xmlfile<span style="color:#cccccc">,</span> openpyxl
Running setup<span style="color:#cccccc">.</span>py install <span style="color:#cc99cd">for</span> et<span style="color:#67cdcc">-</span>xmlfile <span style="color:#cccccc">.</span><span style="color:#cccccc">.</span><span style="color:#cccccc">.</span> done
Running setup<span style="color:#cccccc">.</span>py install <span style="color:#cc99cd">for</span> openpyxl <span style="color:#cccccc">.</span><span style="color:#cccccc">.</span><span style="color:#cccccc">.</span> done
Successfully installed et<span style="color:#67cdcc">-</span>xmlfile<span style="color:#67cdcc">-</span><span style="color:#f08d49">1.0</span><span style="color:#f08d49">.1</span> jdcal<span style="color:#67cdcc">-</span><span style="color:#f08d49">1.4</span><span style="color:#f08d49">.1</span> openpyxl<span style="color:#67cdcc">-</span><span style="color:#f08d49">3.0</span><span style="color:#f08d49">.1</span>
WARNING<span style="color:#67cdcc">:</span> You are using pip version <span style="color:#f08d49">19.2</span><span style="color:#f08d49">.3</span><span style="color:#cccccc">,</span> however version <span style="color:#f08d49">19.3</span><span style="color:#f08d49">.1</span> is available<span style="color:#cccccc">.</span>
You should consider upgrading via the <span style="color:#7ec699">'python -m pip install --upgrade pip'</span> command<span style="color:#cccccc">.</span>
</code></span></span> Input pip install --upgrade pip
<span style="background-color:#2d2d2d"><span style="color:#cccccc"><code class="language-c">C<span style="color:#67cdcc">:</span>\Users\<span style="color:#f08d49">24144</span>\AppData\Local\Programs\Python\Python37\Scripts<span style="color:#67cdcc">></span>pip install <span style="color:#67cdcc">--</span>upgrade pip
Collecting pip
Using cached https<span style="color:#67cdcc">:</span><span style="color:#999999">//files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl</span>
Installing collected packages<span style="color:#67cdcc">:</span> pip
Found existing installation<span style="color:#67cdcc">:</span> pip <span style="color:#f08d49">19.2</span><span style="color:#f08d49">.3</span>
Uninstalling pip<span style="color:#67cdcc">-</span><span style="color:#f08d49">19.2</span><span style="color:#f08d49">.3</span><span style="color:#67cdcc">:</span>
Successfully uninstalled pip<span style="color:#67cdcc">-</span><span style="color:#f08d49">19.2</span><span style="color:#f08d49">.3</span>
ERROR<span style="color:#67cdcc">:</span> Could not install packages due to an EnvironmentError<span style="color:#67cdcc">:</span> <span style="color:#cccccc">[</span>WinError <span style="color:#f08d49">5</span><span style="color:#cccccc">]</span> Access denied .<span style="color:#67cdcc">:</span> <span style="color:#7ec699">'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-uninstall-aj7beqe0\\pip.exe'</span>
Consider using the `<span style="color:#67cdcc">--</span>user` option or check the permissions<span style="color:#cccccc">.</span>
</code></span></span> Access denied , Input pip install --user --upgrade pip that will do
summary
use pip Install expansion pack , To go to pip Installation directory . Usually in python Of scripts Under the table of contents .
If you find that 「pip Not an internal or external command , Nor are they runnable programs or batch files 」 After this question , First check Scripts Is there any in the folder pip package , Look again Scripts Whether the folder has been added to the environment variable .
【 Expand 】:
No matter when , stay cmd In the :
Not an internal or external command , Nor are they runnable programs or batch files Error of
There is no corresponding executable program found , therefore :
1. There is really no executable program in the system itself \to→ Download or install such programs , Remember to make sure PATH Contains the corresponding path .
2. There is such a program , however PATH There is no corresponding path in the \to→ Add the corresponding path to PATH Then you can .
【 reference 】
[1]:https://blog.csdn.net/miss85246/article/details/81069276
[2]:https://blog.csdn.net/weixin_30375427/article/details/96542832
[3]:https://blog.csdn.net/weixin_45905909/article/details/103170453
Click to follow , The first time to learn about Huawei's new cloud technology ~
边栏推荐
- QT -- how to get the contents of selected cells in qtableview
- 2022年最新宁夏建筑安全员模拟题库及答案
- Market scale forecast and future competitive trend outlook report of China's plastic and cosmetic industry 2022-2028
- Software usage of Tencent cloud TDP virt viewer win client
- Negative remainder problem
- Report on market demand trends and future strategic planning recommendations of the global and Chinese smart financial solutions industry 2022-2028
- Learning summary in March
- Analysis report on market demand and investment strategy of China's re guarantee industry 2022-2028
- Fault analysis | a case of MySQL remote slave database replication delay
- 【数字IC/FPGA】数据累加输出
猜你喜欢

Reading small programs based on wechat e-book graduation design works (7) Interim inspection report

Reading applet based on wechat e-book graduation design (2) applet function

unity websockt一些知识:

3D object detection

Fault analysis | a case of MySQL remote slave database replication delay

基于微信电子书阅读小程序毕业设计毕设作品(5)任务书

进程的创建fork()、消亡wait()

用户权限和组权限

Wechat e-book reading applet graduation design work (6) opening defense ppt

3GPP RAN第一次F2F会议,都干了些啥?
随机推荐
Report on market demand trends and future strategic planning recommendations of the global and Chinese smart financial solutions industry 2022-2028
[blockbuster release] ant dynamic card, enabling the app home page to realize agile update
Module 8 fonctionnement
DACOM G150 dual-mode earphones make sound for love and protect the healthy growth of children's hearing
Jenkins中pipeline对接CMDB接口获取主机列表的发布实践原创
PostgreSQL database replication - background first-class citizen process walreceiver PG_ stat_ wal_ Receiver view
How does Eldon's ring of the law get lune quickly? Introduction to the fastest and safest method for obtaining lune
Details of thansmitablethreadlocal
Reading small program based on wechat e-book graduation design (4) opening report
ThansmittableThreadLocal详解
3GPP RAN第一次F2F会议,都干了些啥?
设备管理-借还模块1
Shell programming regular expressions and metacharacters
What are the third-party software testing organizations in Shanghai that share knowledge about software validation testing?
基于微信电子书阅读小程序毕业设计毕设作品(8)毕业设计论文模板
编程工具下载地址
Module 8 operation
Super heavy! Apache Hudi multimode index optimizes queries up to 30 times
leetcodeSQL:602. Friend application II: who has the most friends
基于微信电子书阅读小程序毕业设计毕设作品(6)开题答辩PPT