pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
16.21k stars 6.95k forks source link

Conda package should support pillow-simd #4103

Open bryant1410 opened 3 years ago

bryant1410 commented 3 years ago

🐛 Bug

torchvision Conda package, at least with v0.10.0, depends on pillow, which complicates using pillow-SIMD.

To Reproduce

Steps to reproduce the behavior:

  1. Install torchvision with Conda.
  2. Try to uninstall pillow, but would try to uninstall torchvision. Alternatively, you can do conda remove --force pillow to only remove it, but the environment will be in an inconsistent state. It's the best workaround AFAIK though.
  3. Install pillow-SIMD.

Expected behavior

The expected behavior would be to be able to choose between pillow and pillow-SIMD, or be able to uninstall pillow without breaking things, and then install pillow-SIMD. After this, every time you try installing something with conda, it's gonna try to install pillow again.

Maybe pillow shouldn't be a dependency then? Maybe the ideal solution is to pillow-SIMD to provide a conda package called pillow, or something like that (or like a virtual package to support both?).

bryant1410 commented 3 years ago

Another workaround: https://github.com/uploadcare/pillow-simd/issues/44#issuecomment-447416039 (creating a conda package of pillow-SIMD from the source called pillow). Though it didn't work fine for me. Seems to require more configuration changes.