PS D:\工作报告\Safetek\DNS系统\脚本程序\GeoIP> pip install geoip2
Collecting geoip2
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002A61A83B820>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/74/b6/21cc1cae1fba6c2256550f06a075427d7e01e55b16990349dc5ebb126d5a/geoip2-4.5.0-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002A61A83B970>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/74/b6/21cc1cae1fba6c2256550f06a075427d7e01e55b16990349dc5ebb126d5a/geoip2-4.5.0-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002A61A83BB20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/74/b6/21cc1cae1fba6c2256550f06a075427d7e01e55b16990349dc5ebb126d5a/geoip2-4.5.0-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002A61A83BDF0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/74/b6/21cc1cae1fba6c2256550f06a075427d7e01e55b16990349dc5ebb126d5a/geoip2-4.5.0-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002A61A83BF40>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/74/b6/21cc1cae1fba6c2256550f06a075427d7e01e55b16990349dc5ebb126d5a/geoip2-4.5.0-py2.py3-none-any.whl
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/74/b6/21cc1cae1fba6c2256550f06a075427d7e01e55b16990349dc5ebb126d5a/geoip2-4.5.0-py2.py3-none-any.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002A61A814A30>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
解决:
设置超时时间延长后重新下载。
pip3 --default-timeout=100 install opencv-python==3.4.0.14
更换安装源。
- 清华大学开源软件镜像 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
-
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple geoip2