pipwin已安装但无法识别,PyAudio安装失败技术求助
Hey there, let's work through this issue where pipwin won't run even though pip says it's installed. Here's what's going on and how to fix it:
Why this happens
When you install pipwin via pip, it gets placed in a Python "Scripts" folder on your system—but this folder might not be added to your system PATH yet. PowerShell can't find the pipwin executable unless its location is in the PATH, which is why you get the "not recognized" error. The old pip wrapper warning is just a separate minor issue, but we can fix that too.
Step-by-step solutions
1. Verify pipwin's installation location
First, find exactly where pipwin was installed. Run this command in your PowerShell window:
pip show pipwin
Look for the Location line in the output. It will point to a folder like C:\Users\adity\AppData\Roaming\Python\Python311\Lib\site-packages—the corresponding Scripts folder (where pipwin.exe lives) will be in the same parent directory, e.g., C:\Users\adity\AppData\Roaming\Python\Python311\Scripts.
2. Add the Scripts folder to PATH temporarily (for the current session)
If you just want to get pipwin working right now, run this command (replace the path with the one you found above):
$env:Path += ";C:\Users\adity\AppData\Roaming\Python\Python311\Scripts"
Now try running pipwin install pyaudio again—it should work.
3. Add the Scripts folder to PATH permanently
To make sure this works in future PowerShell sessions:
- Right-click This PC → Properties → Advanced system settings → Environment Variables
- Under User variables, find the
Pathvariable and click Edit - Click New and paste the full path to the Python Scripts folder you found earlier
- Click OK on all windows, then restart PowerShell
4. Bypass PATH entirely (quick workaround)
If you don't want to mess with PATH settings, you can run pipwin directly via Python's module loader:
python -m pipwin install pyaudio
This tells Python to locate the pipwin module and execute it, skipping the need for the pipwin command to be in PATH.
Bonus: Fix the old pip wrapper warning
To get rid of that initial pip warning, upgrade pip to the latest version:
python -m pip install --upgrade pip
内容的提问来源于stack exchange,提问作者Aditya Vijay

