pip使用报错“module object is not callable”
pip报错
TypeError: 'module' object is not callable
C:\Users\滚动的蛋>pip Traceback (most recent call last): File "d:\python3.8\lib\runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "d:\python3.8\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\python3.8\Scripts\pip.exe\__main__.py", line 9, in <module> TypeError: 'module' object is not callable
原因:
卸载了原来的安装python3.7版本,重新安装python3.8后pip出现错误
解决方法:
卸载pip
直接打开cmd命令窗口更新pip时会重新安装一份新版本pip,这就导致了电脑中有两个pip同时存在,这时需要把新安装的pip卸载。
python -m pip uninstall pip
卸载后关闭cmd命令窗口,以管理员身份重新打开cmd命令窗口更新pip,这时pip就已经好用了。