Python 3.6下使用pip安装包报错问题咨询
Hey there! Let’s walk through the most common overlooked issues that cause this problem—even when you’ve added Python to your system PATH.
PATH Order Matters
If you have other Python versions (like 2.x) or programs with the samepython.exename installed, your system might be picking those first. Open a new cmd window and runwhere python—check if the top result points to your Python 3.6.4 installation folder (e.g.,C:\Python36\python.exe). If not, edit your system PATH to move the Python 3.6 directory (and itsScriptssubfolder) to the very top.You Didn’t Restart Your Cmd Window
This is a classic mistake! When you modify the system PATH, any already-open command prompts won’t pick up the new changes. You need to close all cmd windows and open a fresh one for the updated PATH to take effect.Missing the Scripts Directory in PATH
Even if you added the main Python folder, forgetting theScriptssubfolder (e.g.,C:\Python36\Scripts) can break commands likepip. Double-check your system environment variables to ensure both directories are listed in PATH.Using the Wrong Command
Unlike Linux/macOS, Windows doesn’t typically usepython3to call Python 3. Try runningpythonfirst—if that launches an older version, usepy -3.6instead (this uses the Python Launcher for Windows, which should be included with your installation to target specific versions).Corrupted Installation
If none of the above works, your install might be damaged. Uninstall Python 3.6.4 completely, download a fresh copy of the official installer, make sure to check the "Add Python to PATH" box during setup, and do a full reinstall. Restart your computer afterward to confirm.
内容的提问来源于stack exchange,提问作者umair durrani

