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

Pip wheel does not build in Docker with Python 3.13 and PEP 517 #217

Open
Zerotask opened this issue Jan 9, 2025 · 3 comments
Open

Pip wheel does not build in Docker with Python 3.13 and PEP 517 #217

Zerotask opened this issue Jan 9, 2025 · 3 comments

Comments

@Zerotask
Copy link

Zerotask commented Jan 9, 2025

When I switched the Python version in our Dockerfile to the image python:3.13-slim, our command with poetry installed failed to build:

25.29 PEP517 build of a dependency failed
25.29 
25.29 Backend subprocess exited when trying to invoke build_wheel
25.29 
25.29     | Command '['/tmp/tmpnktswc12/.venv/bin/python', '/usr/local/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py', 'build_wheel', '/tmp/tmpu2wqa1m3']' returned non-zero exit status 1.
25.29     | 
25.29     | Running `maturin pep517 build-wheel -i /tmp/tmpnktswc12/.venv/bin/python --compatibility off`
25.29     | 💥 maturin failed
25.29     |   Caused by: Cargo metadata failed. Do you have cargo in your PATH?
25.29     |   Caused by: No such file or directory (os error 2)
25.29     | Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/tmpnktswc12/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
25.29 
25.29 Note: This error originates from the build backend, and is likely not a problem with poetry but one of the following issues with minify-html (0.15.0)
25.29 
25.29   - not supporting PEP 517 builds
25.29   - not specifying PEP 517 build requirements correctly
25.29   - the build requirements are incompatible with your operating system or Python version
25.29   - the build requirements are missing system dependencies (eg: compilers, libraries, headers).
25.29 
25.29 You can verify this by running pip wheel --no-cache-dir --use-pep517 "minify-html (==0.15.0)".
25.29 
------
Dockerfile:36
--------------------
  35 |     
  36 | >>> RUN pip --no-cache-dir install poetry~=2.0 && \
  37 | >>>     poetry config virtualenvs.create false && \
  38 | >>>     poetry install --no-cache --without dev && \
  39 | >>>     chown -R app:app ${HOME}
  40 |     
--------------------

With the image python:3.12-slim docker does build the image without errors.

@shmulvad
Copy link

This is because the latest available release, 0.15.0, only supports up until Python 3.12.

Support for Python 3.13 has been merged into the main branch (in #205), but a release has not been made since this happened.

See #201, which is essentially what you want.

@hpooni
Copy link

hpooni commented Feb 6, 2025

@wilsonzlin, any idea when we can expect the changes to be released?

@Thutmose3
Copy link

@wilsonzlin Same for me

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

No branches or pull requests

4 participants