ITADN

Fix installation on modern Python versions

#70Openartob 创建于 2025-05-14
A
artobcommented
This package no longer installs as of May 2025 and Python 3.13.2: ```console $ pip install openapi2jsonschema ... Collecting pyyaml<6.0,>=5.1 (from openapi2jsonschema) Downloading PyYAML-5.4.1.tar.gz (175 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [65 lines of output] ... AttributeError: cython_sources [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. ``` The [workaround](https://stackoverflow.com/a/77491847) is as follows: ```bash pip install "cython<3.0.0" wheel pip install setuptools pip install "pyyaml==5.4.1" --no-build-isolation pip install openapi2jsonschema openapi2jsonschema --help ``` Or better yet, use [uv](https://docs.astral.sh/uv/) to sandbox all the preceding in a dedicated venv: ```bash uv init uv pip install "cython<3.0.0" wheel uv pip install setuptools uv pip install "pyyaml==5.4.1" --no-build-isolation uv pip install openapi2jsonschema uv run openapi2jsonschema --help ```
1 条评论