pip no longer working after update error 'module' object is not callable

Agustin picture Agustin · Oct 18, 2019 · Viewed 54.3k times · Source

After a pip update, pip has stopped working completely.

Z:\>pip install matplotlib
Traceback (most recent call last):
  File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python37\Scripts\pip.exe\__main__.py", line 9, in <module>
TypeError: 'module' object is not callable

Any help please?

Edit: I am working on windows 10

Answer

Toothpick Anemone picture Toothpick Anemone · Oct 24, 2019

All credit for this goes to user han_solo, who left the answer as a comment, instead of as an answer:

Instead of pip install stdlib_list --user

use python -m pip install stdlib_list --user

Replace stdlib_list with matplotlib or whatever the name is of the package you want.