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

[BUG] Unable to install with pip because PyO3 cannot be installed under Python 3.13 #575

Closed
1 task
yookoala opened this issue Oct 21, 2024 · 6 comments
Closed
1 task
Labels
bug Something isn't working

Comments

@yookoala
Copy link

Issue description:

I am unable to install the latest lightllm (1.24.5) with pip in Python 3.13.0 environment because one of the dependencies, PyO3, explicitly prohibit installation in Python version bigger than 3.12.x.

Steps to reproduce:

Please list the steps to reproduce the issue, such as:

  1. Install a Linux environment with Python 3.13 as default (e.g. Fedora 41) with rust / cargo installed.
  2. pip install lightllm
  3. See error

Expected behavior:

Install without a problem

Error logging:

Collecting litellm==1.24.5 (from litellm)
  Using cached litellm-1.24.5-py3-none-any.whl.metadata (13 kB)
...
...
      error: failed to run custom build command for `pyo3-ffi v0.21.2`
      
      Caused by:
        process didn't exit successfully: `/tmp/pip-install-oyd1_m1x/tokenizers_62ef928fe8ec474bbbfce1945c44b007/bindings/python/target/release/build/pyo3-ffi-c3165566ac7be924/build-script-build` (exit status: 1)
        --- stdout
        cargo:rerun-if-env-changed=PYO3_CROSS
        cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
        cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
        cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY
      
        --- stderr
        error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
        = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
        = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
      warning: build failed, waiting for other jobs to finish...
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/usr/bin/python3" PYTHON_SYS_EXECUTABLE="/usr/bin/python3" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-oyd1_m1x/tokenizers_62ef928fe8ec474bbbfce1945c44b007/bindings/python/Cargo.toml" "--release" "--lib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python3', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tokenizers)

If applicable, please copy and paste the error message or stack trace here. Use code blocks for better readability.

Environment:

Please provide information about your environment, such as:

  • Python 3.13.0

  • OS: (Fedora 41)

  • LightLLm: 1.24.5

Additional context:

@yookoala yookoala added the bug Something isn't working label Oct 21, 2024
@hiworldwzj
Copy link
Collaborator

@yookoala lightllm has not been tested in python 3.13 (too latest). so there may be some env issues. we will support python 3.13 in future. Now we suggest to use python 3.9 to install lightllm.

@yookoala
Copy link
Author

I believe lightllm itself is not a problem here. Rather tokenizers (huggingface/tokenizers#1657) is depending on older pyo3, which requires Python 3.12 or below. Works like huggingface/tokenizers#1646 could probably fix the issue.

@yookoala
Copy link
Author

I suggest to keep this bug alive to keep track the issue for user(s) who faces the problem.

@yookoala
Copy link
Author

Updates:

@yookoala
Copy link
Author

yookoala commented Nov 2, 2024

Updates:

@yookoala
Copy link
Author

yookoala commented Nov 5, 2024

The problem is fixed by upstream. Closing this issue now.

@yookoala yookoala closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants