安装selenium pip install -U selenium
如果出现以下错误:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001AA5A370610>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/selenium/
解决方案,如下:
pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
如果运行之后出现以下错误:
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
这是因为服务器连接超时,可以使用以下代码解决:
python -m pip install --upgrade pip -i https://pypi.douban.com/simple