[Solved] PIP Install Error: FILE “D:\PYTHON39\SCRIPTS\PIP.EXE\__MAIN__.PY”, LINE 4, IN MODULENOTFOUNDERROR: NO MODULE NAMED ‘PIP’

Because other libraries are installed, an error occurs when executing the pip command:

D:\Python39>pip install xlrd
Traceback (most recent call last):
File “d:\python39\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “d:\python39\lib\runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “D:\Python39\Scripts\pip.exe\__main__.py”, line 4, in <module>
ModuleNotFoundError: No module named ‘pip’

Solution:

Execute the following command: python -m ensurepip

 

 

 

After success, try the pip command again: pip install xlrd

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *