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

[Issue]: Error with maturin when installing #1559

Open
3 tasks done
Bennoo opened this issue Dec 26, 2024 · 7 comments
Open
3 tasks done

[Issue]: Error with maturin when installing #1559

Bennoo opened this issue Dec 26, 2024 · 7 comments
Labels
triage Default label assignment, indicates new issue needs reviewed by a maintainer

Comments

@Bennoo
Copy link

Bennoo commented Dec 26, 2024

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
  • I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.

Describe the issue

When installing on a Ubuntu container, I have the following error:

maturin failed
        Caused by: `project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-ud5vfdfg', '--interpreter', '/usr/local/bin/python3.12']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-ud5vfdfg --interpreter /usr/local/bin/python3.12`
      [end of output]

I don't know how to solve this..
the docker image is python:3.12.8-bookworm with rust installed.
any Idea ??

Steps to reproduce

No response

GraphRAG Config Used

# Paste your config here

Logs and screenshots

No response

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:
@Bennoo Bennoo added the triage Default label assignment, indicates new issue needs reviewed by a maintainer label Dec 26, 2024
@APavlides
Copy link

APavlides commented Dec 26, 2024

Thank you for raising. I have the same issue with ubuntu container. The problem seems to stem from graspologic dependency, or more specifically graspologic-native. I tried building manually with maturin too but without success:

maturin build --release
warning: `/app/graspologic-native-main/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
    Updating crates.io index
     Locking 75 packages to latest compatible versions
      Adding clap v2.34.0 (available: v4.5.23)
      Adding indoc-impl v0.3.6 (available: v0.3.7)
      Adding pyo3 v0.15.2 (available: v0.23.3)
  Downloaded byteorder v1.5.0
  Downloaded quote v1.0.38
  Downloaded atty v0.2.14
  Downloaded strsim v0.8.0
  Downloaded proc-macro2 v1.0.92
  Downloaded unicode-ident v1.0.14
  Downloaded getrandom v0.2.15
  Downloaded ppv-lite86 v0.2.20
  Downloaded instant v0.1.13
  Downloaded zerocopy-derive v0.7.35
  Downloaded once_cell v1.20.2
  Downloaded hermit-abi v0.1.19
  Downloaded vec_map v0.8.2
  Downloaded clap v2.34.0
  Downloaded libc v0.2.169
  Downloaded smallvec v1.13.2
  Downloaded textwrap v0.11.0
  Downloaded lock_api v0.4.12
  Downloaded autocfg v1.4.0
  Downloaded ansi_term v0.12.1
  Downloaded syn v2.0.91
  Downloaded zerocopy v0.7.35
  Downloaded unicode-width v0.1.14
  Downloaded 23 crates (2.1 MB) in 1.07s
💥 maturin failed
  Caused by: `project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list

@Retto
Copy link

Retto commented Dec 26, 2024

Hi,

I got the exact same error when following the tutorial. After several hours of googling and several attempts, I passed the issue. The short answer is that the error is related to the current Python build system version and some incompatibility in some dependencies. I downgraded to Python version 3.9.12, and it is good to go now.

Here is the detailed answer: https://stackoverflow.com/questions/62983756/what-is-pyproject-toml-file-for

fyi @Bennoo, @APavlides

@katlyn
Copy link

katlyn commented Dec 27, 2024

This is due to changes in maturin 1.8.0, which now require project.dynamic = ["version"] to be specified in pyproject.yaml. The related changes are in PyO3/maturin#2391.

@Bennoo
Copy link
Author

Bennoo commented Dec 27, 2024

Hello, when I try to downgrade to python 3.9.12. I have the following error:

ERROR: Ignored the following versions that require a different python version: 0.1.1 Requires-Python <3.13,>=3.10; 0.2.0 Requires-Python <3.13,>=3.10; 0.2.1 Requires-Python <3.13,>=3.10; 0.2.2 Requires-Python <3.13,>=3.10; 0.3.0 Requires-Python <3.13,>=3.10; 0.3.1 Requires-Python <3.13,>=3.10; 0.3.2 Requires-Python <3.13,>=3.10; 0.3.3 Requires-Python <3.13,>=3.10; 0.3.4 Requires-Python <3.13,>=3.10; 0.3.5 Requires-Python <3.13,>=3.10; 0.3.6 Requires-Python <3.13,>=3.10; 0.4.0 Requires-Python <3.13,>=3.10; 0.4.1 Requires-Python <3.13,>=3.10; 0.5.0 Requires-Python <3.13,>=3.10; 0.9.0 Requires-Python <3.13,>=3.10; 1.0.0 Requires-Python <3.13,>=3.10; 1.0.1 Requires-Python <3.13,>=3.10 ERROR: Could not find a version that satisfies the requirement graphrag (from versions: none)

It seems graphrag need python >= 3.10 😱

I also tried to downgrade maturin to 1.7.7 (before the specified change) but I still have the same issue when installing graphrag:

Downloaded winapi-x86_64-pc-windows-gnu v0.4.0 💥 maturin failed Caused by: project.versionfield is required in pyproject.toml unless it is present in theproject.dynamiclist Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-wz054tu7', '--interpreter', '/usr/local/bin/python3.12']' returned non-zero exit status 1. Checking for Rust toolchain.... Runningmaturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-wz054tu7 --interpreter /usr/local/bin/python3.12 [end of output]

I should try with some previous version of maturin?

@Retto
Copy link

Retto commented Dec 27, 2024

Hi,

According to @katlyn's comment, the issue has been fixed and merged into the main branch of maturin. Could you check using the latest version of maturin?

@Bennoo
Copy link
Author

Bennoo commented Dec 27, 2024

Not working (maturin version 1.8.0).. Should I add this version somewhere? I don't exactly get the point here.. The related toml file is the one for GraphRag?

@katlyn
Copy link

katlyn commented Dec 27, 2024

According to @katlyn's comment, the issue has been fixed and merged into the main branch of maturin. Could you check using the latest version of maturin?

@Retto the issue is caused by that change to maturin, not fixed by it. Projects that use maturin as a dependency will need to update themselves to correct for the change. The instructions in my comment about adding a line to pyproject.yaml are for downstream applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Default label assignment, indicates new issue needs reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants