报错信息如下:
D:\cmder
λ pip list
Traceback (most recent call last):
File "d:\python\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\python\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\python\Scripts\pip.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'
解决方案:重装pip
终端运行:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py --force-reinstall
再次测试就正常了
pip install xxx 报错:read time out
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
解决:
pip --default-timeout=100 install