-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathPip Install Not Working
33 lines (27 loc) · 1.97 KB
/
Pip Install Not Working
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
***********************************************************
Open Command Prompt:
Execute the command “python -v”. It will tell you the python version.
Execute the command “pip –version”. It will tell you the pip version. If you encounter errors in this step, it means that pip is not installed or not added to the PATH environment.
Then, you need to see if their versions are the same. If not, you need to update pip or reinstall it.
************************************************************
1
Way 1. Add Pip to PATH
If you didn’t change the installation location, the default pip path should be C:UsersUsernameAppDataLocalProgramsPythonPython310Scripts. Now, you should add this path to the environment variables. Here is the guide:
Press “Windows key + R” to open the Run dialog box.
In the Run box, type “sysdm.cpl” and press Enter to open the System Properties window.
Go to the Advanced tab and click Environment Variables.
Double-click the PATH variable under System Variables.
Click New, and add the pip path. Then, select OK.
(Path is under python39/scripts or users or ..)
2
Way 2. Install Pip
If pip is not installed, you can install it by executing the following commands:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py (If your Python is 3.x version, please execute python3 get-pip.py)
The first command will download the installation script and the second command will run the script. Now, you can find the pip.exe under the Python scripts directory.
3
Way 3. Update Pip
If the pip version is lower than the Python version, you may need to upgrade pip using the command “pip install -U pip”. If this command doesn’t work, you can try this command “easy_install –upgrade pip”.
4
Way 4. Reinstall Python and Pip
If all the above ways don’t work, I recommend you reinstall Python and pip. You need to uninstall Python first and then you can install the latest Python. This time, please remember to install pip and add it to the path.