[Solved] Pycharm Use pip Error: Script file ‘D:\Anaconda3\envs\pytorch\Scripts\pip-script.py‘ is not present

Problem Description:

error reporting 1: error reporting for PIP installation: script file’d:\anaconda3\envs \ pytorch\scripts\PIP script. Py ‘is not present.
error reporting 2: PIP upgrade failed: script file’d:\anaconda3\envs\pytorch\scripts\PIP script. Py’ is not present.
as shown in the following figure:


Solution:

Baidu has had the following solutions for a long time:

# Method 1: Use the command line to go to the Anconda3\Scripts\ directory and execute the command, or if it is a virtual environment, go to the \Scripts\ directory under the virtual environment

    easy_install pip # I tried this method, but it didn't work for me 
    
# Method 2: Also go to the directory and execute the following statement

    python -m ensurepip --default-pip # Perfect solution

Read More: