girder/large_image

pip install large-image[common] now includes dependencies?

Closed this issue · 5 comments

I just tried installing large_image via pip install large-image[common] and ran into the following:

Collecting pillow-jxl-plugin
  Downloading pillow_jxl_plugin-1.2.0.tar.gz (13 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [end of output]

My understanding from the readme was that common was supposed to be only those things that didn't have other dependencies. I installed large_image just a couple of weeks ago (1.27.2) without this problem cropping up. Is this new?

Hmm... The intent is that common installs on Windows, OSX, and linux, so it can have dependencies, but only if they have wheels for all platforms. The pil-jxl-plugin was updated yesterday; I suspect you tried to install between the pure python package and their wheels being published. Can you try again?

I just tried again and it installed just fine. I guess your suspicion of unfortunate timing trying to install mid-update is likely the culprit.

I'm getting the exact same error once again when trying to install large_image[common]:

Collecting pillow-jxl-plugin
  Using cached pillow_jxl_plugin-1.2.4.tar.gz (240 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

I don't see any release on pypi since April 27th, so I'm not sure why this is happening. Any thoughts @manthey ?

Looks like this issue is caused by a dependency of pillow-jxl-plugin - I've opened an issue.

I also came across an open PR in the PIL repo that adds jpegxl support to PIL directly: python-pillow/Pillow#7848 @manthey, thoughts on using this rather than pillow-jxl-plugin once it is merged?

@pearcetm The goal of the [commons] dependencies was to install all readers we could that worked directly from a pip install without our custom-built wheels on the three major platforms. Since we depend on other packages building wheels for each of the dependencies, issues like this will probably arise again in the future. Some of it can be mitigated by always doing pip install large_image[common] --prefer-binary. If PIL supports jxl files directly, then we should definitely stop asking to use the extra package.

I'll close this issue for now.