pip安装selenium模块报:ERROR: Could not install packages due to an EnvironmentError

在ipython和cmd中使用pip安装selenium模块时报错,如下:

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl (Caused by ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000021606A48130>, 'Connection to files.pythonhosted.org timed out. (connect timeout=15)'))

 

原因:权限不够

解决办法:使用管理员运行cmd,然后再用pip install selenium安装即可。

 

posted @ 2021-02-01 23:20  霍龙  阅读(495)  评论(0)    收藏  举报