Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pearcetm opened this issue Mar 11, 2024 · 5 comments
Closed

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

pearcetm opened this issue Mar 11, 2024 · 5 comments

Comments

@pearcetm
Copy link

pearcetm commented Mar 11, 2024

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?

@manthey
Copy link
Member

manthey commented Mar 12, 2024

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?

@pearcetm
Copy link
Author

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.

@pearcetm
Copy link
Author

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 ?

@pearcetm pearcetm reopened this Jun 10, 2024
@pearcetm
Copy link
Author

pearcetm commented Jun 10, 2024

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?

@manthey
Copy link
Member

manthey commented Jun 19, 2024

@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.

@manthey manthey closed this as completed Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants