专业的编程技术博客社区

网站首页 > 博客文章 正文

Python第三方包安装超时问题(python第三方包离线安装)

baijin 2024-10-31 12:17:41 博客文章 8 ℃ 0 评论

在安装第三方包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命令下载离线包之后安装的方法,尝试了一下,同样也会超时报错,还是需要回到上面的方法来解决问题。

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表