Error when running pip list (modulenotfounderror no module named 'pip._internal.utils')

Question:

I’m having problem whenever I try to run the pip list. Here is the traceback of my error:

Traceback (most recent call last):
File "C:UsersDellAppDataLocalProgramsPythonPython39Scriptspip-script.py", line 33, in <module> sys.exit(load_entry_point('pip==19.0.3', 'console_scripts', 'pip')())
File "C:UsersDellAppDataLocalProgramsPythonPython39Scriptspip-script.py", line 25, in importlib_load_entry_point
        return next(matches).load()
File "C:UsersDellAppDataLocalProgramsPythonPython39libimportlibmetadata.py", line 77, in load
        module = import_module(match.group('module'))
File "C:UsersDellAppDataLocalProgramsPythonPython39libimportlib__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:UsersDellAppDataLocalProgramsPythonPython39libsite-packagespip_internal__init__.py", line 3, in <module>
        import pip._internal.utils.inject_securetransport  # noqa
ModuleNotFoundError: No module named 'pip._internal.utils'

Can anybody explain me why this error occurs and provide some help?

Asked By: Sue

||

Answers:

curl bootstrap.pypa.io/get-pip.py -o get-pip.py 
python3 get-pip.py --force-reinstall

I tried this and it solved so I will just leave this here for future references!

Answered By: Sue
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.