uv: Packages that fail to install under PEP 517 with build isolation
I don’t know that an issue is the right home for this, but I want to track the packages we know can’t be installed under PEP 517 when build isolation is enforced. In all cases, these packages also fail under pip install --use-pep517.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 8
- Comments: 30 (17 by maintainers)
Commits related to this issue
- Stop installing setuptools and wheel Currently the buildpack performs a system site-packages install of not only pip, but also setuptools and wheel. This has historically been necessary for pip to be... — committed to heroku/buildpacks-python by edmorley 2 years ago
- Stop installing setuptools and wheel Currently the buildpack performs a system site-packages install of not only pip, but also setuptools and wheel. This has historically been necessary for pip to be... — committed to heroku/buildpacks-python by edmorley 2 years ago
- Stop installing setuptools and wheel Currently the buildpack performs a system site-packages install of not only pip, but also setuptools and wheel. This has historically been necessary for pip to be... — committed to heroku/buildpacks-python by edmorley 2 years ago
- Stop installing setuptools and wheel (#243) Currently the buildpack performs a system site-packages install of not only pip, but also setuptools and wheel. This has historically been necessary for ... — committed to heroku/buildpacks-python by edmorley 2 years ago
I was having problems with packages
flash-attnandauto-gptq, as they both requiretorchandsetuptoolsto be installed before their build begins. I tried many things (tool.uv.dependency-metadata, following that page in the docs and playing around with pyproject.toml), but the only thing that worked and seems like a nice solution is using dependency groups.So my final
pyproject.tomllooks similar to thisAnd then you can just do
Install build time dependencies (that are also used in project and should not be deleted after build, such as torch)
Install the whole project (including all groups declared in default-groups)
In my opinion, this is much better than declaring dependencies through
optional-dependenciesas suggested by docs, because they are actually not optional - someone usingflash-attnwill most likely usetorchin the project (not just at the build phase) and the solution with groups won’t require to add --extra to every uv sync call and making sure that we retain the build dependencies@charliermarsh @zanieb Perhaps we can update the documentation with this solution for build isolation?
Hope this helps someone
Yeah we should add a nice message for “missing wheel”. We have that for a few other failures. \cc @konstin
@amanmibra – The solution is generally to do something like:
I.e., you create a virtual environment, “manually” install any build dependencies, then install the package in question with
--no-build-isolation, so that it’s built in your virtual environment and has access to the installed dependencies.Is there a workaround for playsound? I had to use real pip instead of uv, which I’d like to avoid.
@astrojuanlu The default backend is defined here: https://github.com/astral-sh/uv/blob/194904b34023a71b749b14f311e2151b3c53750d/crates/uv-build/src/lib.rs#L69-L76
pip install cchardet==2.1.7 --use-pep517does not work for me actually.That solves it - then I get weird C errors but definitely not uv-related.
Do you think uv should automatically recommend this kind of suggestions? A bit like the Rust compiler, that has wonderfully helpful error messages.
@baggiponte – I think you need to install
wheelas well – that’s the trace you get when you’re missingwheel(e.g.,uv pip install wheel).chumpyThis also causes
ViTPoseto fail.