ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url:
/packages/21/ca/3261b5da5b6851ea5297f44b2dc7f3167f00a7ce3e99907b49bf69c56360/Appium-Python-Client-1.0.2.tar.gz (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff5053d09d0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
错误:由于环境错误,无法安装包错误:HTTPSConnectionPool(host='文件.pythonhosted.org',端口=443):超过url的最大重试次数:
/软件包/21/ca/3261b5da5b6851ea5297f44b2dc7f3167f00a7ce3e99907b49bf69c56360/Appium-Python-Client-1.0.2。焦油.gz(由NewConnectionError('<pip_供应商.urllib3.connection.VerifiedHTTPSConnection连接0x7ff5053d09d0>处的对象:未能建立新连接:[Errno 8]提供了nodename或servname,或未知',))
参考资料:https://www.runoob.com/w3cnote/python-pip-install-usage.html
如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
注意事项
如果 Python2 和 Python3 同时有 pip,则使用方法如下:
Python2:
python2 -m pip install XXX
Python3:
python3 -m pip install XXX