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:
- Error in installing Python 3.7 in CentOS 7.6 zipimport.ZipImportError : can’t decompress data; zlib not available
- [Solved] Exception: Jupyter command `jupyter-notbook` not found.
- [Solved] Pyinstaller package Error: AttributeError: ‘str’ object has no attribute ‘decode’
- Error in PIP3 execution of multi version Python by windows: module ‘enum’ has no attribute ‘intflag’?
- [Solved] ModuleNotFoundError: No module named’usysconfigdata u x86 64-u-gnu’
- [Solved] Python: third-party library fire Install Error
- Python.exe Error: No module named pip.__main__; ‘pip’ is a package and cannot be directly executed
- python mac install MySQLdb ModuleNotFoundError No module named ‘ConfigParser’
- Python for mac or windows: ModuleNotFoundError: No module named ‘lxml’ [How to Solve]
- [Solved] Python Error: ModuleNotFoundError: No module named ‘exceptions‘