Pip upgrade error ModuleNotFoundError: No module named pip solution

Traceback (most recent call last):
  File "d:\python375\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\python375\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Python375\Scripts\pip3.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'

When installing other python packages, it was prompted that  pip 10.0.1it was available, so I updated it, but an error occurred during the update process, as shown in the figure,
01.png
because this error caused pip to not be found,
you can execute it first:

python -m ensurepip

then execute

python -m pip install --upgrade pip

The update is now complete.

As shown below:
02.png

Guess you like

Origin blog.csdn.net/qq_36936730/article/details/106663444