当前位置:网站首页>"The" "PIP" "entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program."

"The" "PIP" "entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program."

2022-07-07 16:24:00 Nailaoyyds

Preface

Use Pycharm After creating a new environment , May use pip Install the package , However, the following or similar errors will appear :

     Because the initial error is displayed ModuleNotFoundError: No module named 'requests'

So just use it. pip instal requests To install ,

The initial idea is pycharm Can't install , Install in the folder

  Tips

'C:\Users\86157\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip

  Installation successful

But you still can't use


Solution

This usually happens because cmd( terminal ) Can't recognize pip Instructions , Missing in environment variable pip The program path , Therefore, you need to manually set pip Add the path to the environment variable .

Problem description :

pip : Cannot be “pip” Item identified as cmdlet、 function 、 The name of the script file or runnable program . Please check the spelling of the name , If the path is included , Please make sure the path is correct , then try again .
The position of That's ok :1 character : 1

First check whether it is installed pip, If not, you need to install

Usually , The configured environment includes pip

hold Scripts Add the path of to the environment variable

  After configuring and restarting the computer, it succeeds

 

  summary

The method described in this article is applicable to any version in principle pycharm With any version pip/conda And other similar errors .

原网站

版权声明
本文为[Nailaoyyds]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071412116326.html