进行了pip更新后,pip完全停止工作。
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
有人能帮忙吗?
更新:我正在使用Windows 10操作系统。
python -m pip install matplotlib
,并将出现的错误报告回来。 - han solopython -m pip
的习惯。 - han solopython -m pip
命令运行时,确保调用的pip
与你正在运行的python
相关联。 - han solopip
失败了,而python -m pip
成功了。这是一个多 Python 系统(pip3
和python3 -m pip
也成功了)。我在想如果直接使用pip
,它是否使用了不同的PYTHONPATH
或者做了其他不同的事情。 - Anne van Rossum