rembg-greenscreen icon indicating copy to clipboard operation
rembg-greenscreen copied to clipboard

Failed to install scikit-image (macOS Big Sur 11.2.3)

Open Oppfields opened this issue 3 years ago • 10 comments

System information

  • OS macOS Big Sur 11.2.3
  • Python version: 3.9.1
  • pip 21.0.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

Hi,

I'm having issues with the install and scikit-image throwing up errors which looks like a macOS specific issue. Using sudo -H and or --user still gives errors. All other requirements are satisfied. Any help resolving the install issue would be appreciated.

--

ERROR: Command errored out with exit status 1: /usr/local/opt/[email protected]/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4j/z_6bp83j4ld54fhfh5kx789h0000gn/T/pip-install-2_1gjz34/scikit-image_7401d09bd4c442df88801aef1f118ada/setup.py'"'"'; file='"'"'/private/var/folders/4j/z_6bp83j4ld54fhfh5kx789h0000gn/T/pip-install-2_1gjz34/scikit-image_7401d09bd4c442df88801aef1f118ada/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/4j/z_6bp83j4ld54fhfh5kx789h0000gn/T/pip-record-b00qt4za/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/scikit-image Check the logs for full command output.

--

Oppfields avatar Mar 18 '21 11:03 Oppfields

@Oppfields are you on a Mac M1 machine?

SSardorf avatar Mar 18 '21 17:03 SSardorf

@SSardorf No, I'm using Intel machines and have the same issue on my MBP and OSX86 desktop (both running Big Sur 11.2.3). As a test I installed all the requirements manually with the correct version. The one that fails is scikit_image==0.17.2. I've tested the current stable scikit_image==0.18.1 and it runs the scikit_image gallery examples without errors. It would be great to give this a try even if my 8Gb GPU struggles with the processing.

Oppfields avatar Mar 18 '21 23:03 Oppfields

I've opened a PR for the original rembg repo that changes all of the required dependencies from strict versioning. It has just been merged - I would suggest @ecsplendid changes the requirements.txt to not use strict versioning as well

Edit: To clarify, I got the same error. Changing the requirements from strict versioning fixes this

SSardorf avatar Mar 19 '21 05:03 SSardorf

@SSardorf thanks, and were you able to run some tests and if so what GPU are you using?

Oppfields avatar Mar 19 '21 09:03 Oppfields

Ah thanks @SSardorf , what do you need me to change? Just remove all strict versioning from the requirements? Isn't that considered a bad practice?

I did tweak it a week ago to make it work on Ubuntu out of the box. I actually have a couple of macs so will play asap, the main reason I didn't already is I am assuming the performance of this on any Mac would be unusably slow.

I tried it on a £2000 per month GPU VM in Azure and it was dog slow on that, the code is still very CPU bound and I am trying to figure out how to fix it

ecsplendid avatar Mar 19 '21 11:03 ecsplendid

@ecsplendid you're right, it is bad practice. While it doesn't cause any issues at the moment, you can also just change the scikit_image dependency from scikit_image==0.17.2 to scikit_image==0.18.1, as that also fixes the issue.

@Oppfields I'm on a Macbook Pro M1 - So if you need me to test anything specific on the new M1 chips, let me know. Even though there are some issues with PyTorch and the M1

SSardorf avatar Mar 19 '21 12:03 SSardorf

I think the more it's tested the better and across multiple platforms. On the mac side we are not totally tied to Apple hardware and with OpenCore we have opportunities to try different GPU / CPU combinations. Early days for Apple M1.

Oppfields avatar Mar 19 '21 12:03 Oppfields

@SSardorf perfect, I'm on an Intel MBP with decent GPU and desktop running OpenCore boot loader, 8Gb AMD GPU, I also have a 6Gb Nvidia but CUDA was dropped on the Mac some time ago. Not sure what the status of the Nvidia drivers are at the moment but will test. There will be some interested parties with powerful OpenCore/macOS machines interested in trying this I'm sure.

Oppfields avatar Mar 19 '21 13:03 Oppfields

Hi, I just to confirm @SSardorf findings. I've tested danielgatis/rembg with the updated requirements.txt removing strict versioning. Rembg now installs and runs without errors on macOS Big Sur 11.2.3. Hopefully the updated requirements.txt can be mirrored in rembg-greenscreen when fully tested.

Oppfields avatar Mar 21 '21 10:03 Oppfields

I'm getting the same error on an M1 Machine.

robbiejdunne avatar Apr 21 '21 06:04 robbiejdunne