鱼C论坛

 找回密码
 立即注册
查看: 3211|回复: 2

[已解决]rembg无法使用

[复制链接]
发表于 2022-11-3 13:26:26 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
就是那个抠图的,需要导入第三方库rembg
我就在cmd命令窗口输入pip install rembg 进行安装,
按照小甲鱼的代码去抠图结果报错了。HTTPSConnectionPool(host='drive.google.com', port=443): Max retries exceeded with url: /uc?id=1tCU5MM1LhRgGou5OpmpjBQbSrYIUoYab (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000020691AFAD88>: Failed to establish a new connection: 【WinError 10060】 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))

查了许多资料,有一种说法是在pip安装的时候u2net.pht这个模型没有下载,反复卸载和下载rembg库许多次他还是没有下载成功
请问有什么解决办法呢?
最佳答案
2022-11-3 13:33:46

国外仓库下载速度慢,就像你现在出现的问题就是连接超时

可以试试国内的镜像进行下载,这里是清华镜像:
python -m pip install rembg -i https://pypi.tuna.tsinghua.edu.cn/simple 

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-11-3 13:33:46 | 显示全部楼层    本楼为最佳答案   

国外仓库下载速度慢,就像你现在出现的问题就是连接超时

可以试试国内的镜像进行下载,这里是清华镜像:
python -m pip install rembg -i https://pypi.tuna.tsinghua.edu.cn/simple 

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-11-25 22:32:13 | 显示全部楼层
求助
安装时候报错了
请问该怎么解决
小白换了macbook
报错安装提示如下:
ERROR: Cannot install rembg==2.0.24 and rembg==2.0.25 because these package versions have conflicting dependencies.

The conflict is caused by:
    rembg 2.0.25 depends on numpy==1.21.6
    rembg 2.0.24 depends on numpy==1.21.6

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/to ... ependency-conflicts
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-9-25 13:25

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表