windows安装python,测试pip list命令报错

报错信息如下:

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

猜你喜欢

转载自blog.csdn.net/qq_25905159/article/details/108330185