在安装第三方包playwright时,出现报错信息...Read Timed out,大致是提示超时。
pip install playwright==1.15.3
找了一下解决方法,大致有3个途径:
- 修改默认超时时长,参数--defaut-timeout
pip --defaut-timeout=1000 install playwright==1.15.3
使用上述方法,第三方包成功安装。
- 使用常用的国内源下载,参数-i
#清华源
pip install playwright==1.15.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
#豆瓣源
pip install playwright==1.15.3 -i https://pypi.douban.com/simple
- 增加时长+换源
pip --defaut-timeout=2000 install playwright==1.15.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
还有通过pip download命令下载离线包之后安装的方法,尝试了一下,同样也会超时报错,还是需要回到上面的方法来解决问题。