rembg
rembg copied to clipboard
[BUG] get dependency versioning conflict when trying to install for gpu
Describe the bug
When trying to run pip install rembg[gpu]
I get
ERROR: Cannot install rembg[gpu]==2.0.24 and rembg[gpu]==2.0.25 because these package versions have conflicting dependencies.
The conflict is caused by:
rembg[gpu] 2.0.25 depends on onnxruntime-gpu==1.12.1; extra == "gpu"
rembg[gpu] 2.0.24 depends on onnxruntime-gpu==1.12.1; extra == "gpu"
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
To Reproduce python version 3.10.6 pip version 22.2.2 using venv
run pip install rembg[gpu]
get
Using cached rembg-2.0.25-py3-none-any.whl (12 kB)
Collecting scikit-image==0.19.3
Using cached scikit_image-0.19.3-cp310-cp310-macosx_12_0_arm64.whl (12.5 MB)
Collecting numpy==1.21.6
Using cached numpy-1.21.6-cp310-cp310-macosx_11_0_arm64.whl (12.4 MB)
Collecting watchdog==2.1.9
Using cached watchdog-2.1.9-cp310-cp310-macosx_11_0_arm64.whl (88 kB)
Collecting aiohttp==3.8.1
Using cached aiohttp-3.8.1-cp310-cp310-macosx_11_0_arm64.whl (552 kB)
Collecting click==8.1.3
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting gdown==4.5.1
Using cached gdown-4.5.1.tar.gz (14 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting tqdm==4.64.0
Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
Collecting asyncer==0.0.1
Using cached asyncer-0.0.1-py3-none-any.whl (8.1 kB)
Collecting opencv-python-headless==4.6.0.66
Using cached opencv_python_headless-4.6.0.66-cp37-abi3-macosx_11_0_arm64.whl (30.0 MB)
Collecting python-multipart==0.0.5
Using cached python-multipart-0.0.5.tar.gz (32 kB)
Preparing metadata (setup.py) ... done
Collecting scipy==1.7.3
Using cached scipy-1.7.3-1-cp310-cp310-macosx_12_0_arm64.whl (27.0 MB)
Collecting imagehash==4.2.1
Using cached ImageHash-4.2.1.tar.gz (812 kB)
Preparing metadata (setup.py) ... done
Collecting fastapi==0.80.0
Using cached fastapi-0.80.0-py3-none-any.whl (54 kB)
Collecting pillow==9.2.0
Using cached Pillow-9.2.0-cp310-cp310-macosx_11_0_arm64.whl (2.8 MB)
Collecting pymatting==1.1.8
Using cached PyMatting-1.1.8-py3-none-any.whl (47 kB)
Collecting uvicorn==0.18.3
Using cached uvicorn-0.18.3-py3-none-any.whl (57 kB)
Collecting filetype==1.1.0
Using cached filetype-1.1.0-py2.py3-none-any.whl (17 kB)
Collecting onnxruntime==1.12.1
Using cached onnxruntime-1.12.1-cp310-cp310-macosx_11_0_arm64.whl (5.3 MB)
Collecting rembg[gpu]
Using cached rembg-2.0.24-py3-none-any.whl (12 kB)
ERROR: Cannot install rembg[gpu]==2.0.24 and rembg[gpu]==2.0.25 because these package versions have conflicting dependencies.
The conflict is caused by:
rembg[gpu] 2.0.25 depends on onnxruntime-gpu==1.12.1; extra == "gpu"
rembg[gpu] 2.0.24 depends on onnxruntime-gpu==1.12.1; extra == "gpu"
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/topics/dependency-resolution/#dealing-with-dependency-conflicts
Expected behavior should not have a versioning conflict
Images Input images to reproduce.
OS Version: MacOS 12.5.1
Rembg version: v2.0.25
I am currently facing same issue. Any solution?
It also happens when running pip install rembg
I have a similar problem when trying to install the library
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
Same here... Any solution for this?
Anyone else?
I'm also having this issue. Very sad :(
same here
same to me
same here
You need to check if your system supports the "onnxruntime-gpu".
Go here: https://onnxruntime.ai/