pip install netaddr 报错ERROR: Exception There was an error checking the latest version of pip.

问题现象:

ERROR: Exception:

尝试从系统终端运行此命令。确保使用为 'C:\Users\Administrator\AppData\Local\Programs\Python\Python37\python.exe' 处的 Python 解释器安装的正确版本的 'pip'。

网上查阅文档建议升级pip,直接执行升级报错如下:

pip install --upgrade pip
Requirement already satisfied: pip in c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages (22.2.2)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Collecting pip
  Downloading pip-22.3.1-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 49.1 kB/s eta 0:00:00
ERROR: To modify pip, please run the following command:
c:\users\administrator\appdata\local\programs\python\python37\python.exe -m pip install --upgrade pip
WARNING: There was an error checking the latest version of pip.

解决办法:

带上绝对路径执行升级命令解决

c:\users\administrator\appdata\local\programs\python\python37\python.exe -m pip install --upgrade pip

安装netaddr 同样方法:

c:\users\administrator\appdata\local\programs\python\python37\python.exe -m pip install netaddr

THE END