Tag Archives: PIP error

[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

PIP Fatal error in launcher: Unable to create process using

This happened again when installing Python on a new environment, and this time I looked up and found that there were errors in the original article, so this update should fix most of the problems.

The environment is win8 and only python2.7 was originally installed. And then because python3 is going to be used, in order for them to co-exist, the running file of python3 is changed to python3.exe. This is where PIP running python3 gets the following error
Fatal error in launcher: Unable to create process using ‘”
But running PIP2 is good. If you change the running file for python2.7 to python 2.exe at this point, you will see that pip2 also throws a generic error. This tells you that the error was caused by changing the name of the Python executable.
Many of the scenarios on the Web say that running PYTHON 3-M PIP install — Upgrade PIP to upgrade the PIP version is fine in most cases. Because after reloading, associations are created based on the changed Python execution file. But if your PIP is already up to date, it won’t work, because it doesn’t allow you to upgrade at all. Then use the following command to force a PIP reinstall
Python3-m PIP install — Upgrade –force-reinstall PIP

This solves the PIP error.