在Anaconda环境中安装selenium, 总是有报错,显示: “”ERROR: Could not find a version that satisfies the requirement selenium (from versions: none)
ERROR: No matching distribution found for selenium“”
根据网上的解答尝试了很多方法都失败了,请问这种情况该怎么解决?
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/selenium/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/selenium/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/selenium/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/selenium/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/selenium/
ERROR: Could not find a version that satisfies the requirement selenium (from versions: none)
ERROR: No matching distribution found for selenium
使用其他源,如豆瓣
pip install selenium -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
方法1:增大超时时间
pip --default-timeout=100 install selenium
方法2:修改安装源为清华安装源
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ selenium
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ selenium
有时候可能是网络问题,重新 pip install selenium 即可