Closed
Description
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:
- Install a Linux environment with Python 3.13 as default (e.g. Fedora 41) with rust / cargo installed.
pip install lightllm
- 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:
- Problem caused by add maximum Python version check PyO3/pyo3#3821
- According to this comment, changing Cargo.lock might help but it comes with the package.