安装python+selenium环境时遇到的坑
1、pip install时提示 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after conne或readtimedout
原因:第三方库连接超时
解决办法:
①在网上找了增加连接时延的方式后(pip --default-timeout=100 install selenium),下载过程中仍然可能会提示连接超时,没有从根本上解决问题
②在网上找了另一种方法:尝试指定国内的pip第三方源进行安装
pipy 国内镜像目前有:
http://pypi.douban.com/ 豆瓣
http://pypi.hustunique.com/ 华中理工大学
http://pypi.sdutlinux.org/ 山东理工大学
http://pypi.mirrors.ustc.edu.cn/ 中国科学技术大学
https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学
http://mirrors.aliyun.com/pypi/simple/ 阿里云
安装方法是 -i + URL就可以指定安装源
pip install selenium -i http://mirrors.aliyun.com/pypi/simple/
2、使用国内第三方源安装时提示不被信任