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

Problem installing via pip - outdated dependency #47

Closed
pearcetm opened this issue Jun 10, 2024 · 5 comments · Fixed by #48
Closed

Problem installing via pip - outdated dependency #47

pearcetm opened this issue Jun 10, 2024 · 5 comments · Fixed by #48

Comments

@pearcetm
Copy link

pearcetm commented Jun 10, 2024

I'm trying to install this library using pip install pillow-jxl-plugin and getting the error below. From the error it looks like the plugin depends on jpegxl-src v0.10.2 which appears to have been yanked:
image

I'm not sure exactly where this version number is specified as a dependency.

Here's the full error:

> pip install pillow-jxl-plugin
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
  ╰─> [22 lines of output]
          Updating crates.io index
      error: failed to get `jpegxl-src` as a dependency of package `jpegxl-sys v0.10.2+libjxl-0.10.2 (/private/var/folders/w8/m4st6m2j6vn3l2wdw83gj60m0000gp/T/pip-install-k9kqq3ux/pillow-jxl-plugin_d0d7e5cf120943aaaf3babcda3d40a5d/jpegxl-rs/jpegxl-sys)`
          ... which satisfies path dependency `jpegxl-sys` (locked to 0.10.2+libjxl-0.10.2) of package `jpegxl-rs v0.10.2+libjxl-0.10.2 (/private/var/folders/w8/m4st6m2j6vn3l2wdw83gj60m0000gp/T/pip-install-k9kqq3ux/pillow-jxl-plugin_d0d7e5cf120943aaaf3babcda3d40a5d/jpegxl-rs/jpegxl-rs)`
          ... which satisfies path dependency `jpegxl-rs` (locked to 0.10.2+libjxl-0.10.2) of package `pillow-jxl-plugin v1.2.4 (/private/var/folders/w8/m4st6m2j6vn3l2wdw83gj60m0000gp/T/pip-install-k9kqq3ux/pillow-jxl-plugin_d0d7e5cf120943aaaf3babcda3d40a5d)`
      
      Caused by:
        failed to load source for dependency `jpegxl-src`
      
      Caused by:
        Unable to update /private/var/folders/w8/m4st6m2j6vn3l2wdw83gj60m0000gp/T/pip-install-k9kqq3ux/pillow-jxl-plugin_d0d7e5cf120943aaaf3babcda3d40a5d/jpegxl-rs/jpegxl-src
      
      Caused by:
        failed to read `/private/var/folders/w8/m4st6m2j6vn3l2wdw83gj60m0000gp/T/pip-install-k9kqq3ux/pillow-jxl-plugin_d0d7e5cf120943aaaf3babcda3d40a5d/jpegxl-rs/jpegxl-src/Cargo.toml`
      
      Caused by:
        No such file or directory (os error 2)
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/w8/m4st6m2j6vn3l2wdw83gj60m0000gp/T/pip-modern-metadata-dt91j0oq', '--interpreter', '/Users/Tom/anaconda3/bin/python']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /private/var/folders/w8/m4st6m2j6vn3l2wdw83gj60m0000gp/T/pip-modern-metadata-dt91j0oq --interpreter /Users/Tom/anaconda3/bin/python`
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

@dgutman I think this is the cause of the error we both are seeing.

@Isotr0py
Copy link
Owner

Which platform and python version do you use? It seems that pip doesn't find a matched prebuilt wheel for your python. Installation through pip is expected to install the pre-built wheels instead of the source code.

Building from source through pip may not work for current version, because we use a modified jpegxl-rs fork branch to support exif encoding temporarily.

This will be duplicated once they release the new version on the main branch which added exif support.

@pearcetm
Copy link
Author

pearcetm commented Jun 11, 2024

MacOS Ventura 13.3, Apple M1 Max chip. Cpython 3.10.14.

Strangely, I was getting the same error back in early May, but the next day I was able to install this package again with pip install(issue here: girder/large_image#1475).

@Isotr0py
Copy link
Owner

Isotr0py commented Jun 11, 2024

Emmm, this may cause by our update setup-python@v4 to setup-python@v5. It seems that setup-python@v5 in release CI doesn't setup Cpython3.10 on macos by default, and it only set up python3.11 and python3.12...

I will fix this later.

@Isotr0py
Copy link
Owner

Sorry for the delay, the new macos aarch64 wheel for python3.10 has been uploaded to PYPI.

Can you check if it works now?

@Isotr0py Isotr0py reopened this Jun 15, 2024
@pearcetm
Copy link
Author

Thanks for fixing this! It is working for me now.

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

Successfully merging a pull request may close this issue.

2 participants