解决CMD中pip无法识别问题:按教程操作仍报错求助
Fixing the "'pip' is not recognized" Error on Windows
Hey there, let's get this sorted out—this error almost always boils down to your system not knowing where to locate the pip executable, even though you've downloaded it. Let's walk through the fixes step by step:
Step 1: Locate your pip executable
First, find where your pip.exe file lives:
- If you downloaded pip separately, navigate to the folder where you extracted it, then look for the
Scriptssubfolder—this is wherepip.exeis usually stored. Copy the full path of this folder (e.g.,C:\Users\YourUsername\Downloads\pip-23.3.1\Scripts). - If you installed Python before, pip is likely in your Python installation's
Scriptsfolder (e.g.,C:\Python311\Scripts). Find that folder and copy its path.
Step 2: Add the path to your Windows PATH environment variable
This tells your system where to find pip whenever you type the command:
- Press
Win + R, typesysdm.cpl, and hit Enter to open System Properties. - Go to the Advanced tab, then click Environment Variables.
- In the "System Variables" section, find the
Pathvariable and double-click it. - Click New, paste the path you copied earlier, then click OK on all open windows to save the changes.
Step 3: Test if it works
Close any open Command Prompt windows (this is crucial—old windows won't pick up the new PATH changes), then open a fresh CMD window. Type:
pip --version
If you see output showing pip's version number, you're good to go! Now you can run commands like pip install matplotlib or pip install requests without issues.
If the above doesn't work: Try these alternatives
- Use Python to call pip directly (no PATH setup needed):
Or if you have multiple Python versions installed:python -m pip install matplotlibpy -m pip install requests - Double-check that your pip version is compatible with your Python version. For example, Python 3.6+ requires pip 19.0 or newer—if you downloaded an older pip, grab the latest compatible version.
内容的提问来源于stack exchange,提问作者Adam
相关产品推荐
相关产品推荐

