-
Notifications
You must be signed in to change notification settings - Fork 901
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
UV tries to build from source during package resolution #7299
Comments
Interesting... On my machine, I get:
Which I assume is the expected result? |
Hmm right, maybe I had the other packages installed in the venv and for me it was only missing setuptools which I've added later. But it's essentially the same problem (other packages should be installed first before trying to build the repo from source). |
You would need to run |
|
It looks like |
I see, thanks. Is this because the Finally, even if I'm able to resolve it correctly, I still have the issue of the unset |
Yeah, that's correct. We have to run |
Thanks. After adding a simple pyproject.toml, I am now stuck due to the missing [project]
name = "myproject"
version = "0.1.0"
description = "My project"
requires-python = ">=3.10"
dependencies = [
"numpy>=1.23",
"colorama>=0.4.5",
"cuda-python",
"torch>=2.4.1,<2.5",
"torchvision",
"plyfile",
"tqdm",
"opencv-python",
"imageio",
"pycolmap",
"diff-surfel-rasterization@git+https://github.com/jdumas/diff-surfel-rasterization.git@155efa9",
]
[tool.uv.pip]
extra-index-url = ["https://download.pytorch.org/whl/cu124"] Yields:
|
Dumb question, but is |
It's not. But who should set it? I've added the |
I think you're responsible for setting it, outside of uv. I'm not familiar with building that specific package, but it's not uncommon to need to provide some configuration if you're building packages from source. |
Ok but the problem is that EDIT: If I don't try to build the package (i.e. just install the deps in the pyproject.toml), and then run:
It replies EDIT2: After further investigation it looks like I had the name of a table wrong in my Conda has some way to define env vars in their .yml. Is there something similar supported by UV or |
I am running into a similar problem when trying to install [project]
name = "test"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["torch>=2.3.1", "detectron2>=0.6"]
[tool.uv]
no-build-isolation-package = ["detectron2"]
[tool.uv.sources]
detectron2 = { git = "https://github.com/facebookresearch/detectron2.git" } When running Using CPython 3.12.6 interpreter at: /opt/homebrew/opt/python@3.12/bin/python3.12
Updated https://github.com/facebookresearch/detectron2.git (ebe8b45)
error: Failed to download and build: `detectron2 @ git+https://github.com/facebookresearch/detectron2.git`
Caused by: Build backend failed to determine metadata through `prepare_metadata_for_build_wheel` with exit status: 1
--- stdout:
--- stderr:
Traceback (most recent call last):
File "<string>", line 8, in <module>
ModuleNotFoundError: No module named 'setuptools'
--- The workaround is to add |
I'm going to close this for now because I think the |
What's a good platform to discuss this issue then? While the |
## Summary This is part of making #7299 (comment) better. You can now use `tool.uv.dependency-metadata` for direct URL requirements. Unfortunately, you _must_ include a version, since we need one to perform resolution.
This is correct. On Linux, you should download CUDA runfiles from NVIDIA’s official site (they have downloads for all versions), or use the module system of your compute cluster. For Windows, consider reading a tutorial on best practices for installation. Either way, you need to set up the CUDA environment yourself, not uv. If you want a quick fix, you can set up a Conda environment just for CUDA and run uv in it. But honestly, I wouldn’t recommend it—because, well, Conda. |
Hi. I'm trying to install the setup the following project:
I've tried the various approaches documented in the build isolation page:
But they all failed to locate
setuptools
during resolve:Note that if I manually comment out the
compile
extra in thepyproject.toml
to install all the dependencies I need, and then later on uncomment it, it then fails with a different error message (which is probably a separate issue):Would appreciate any guidance on the matter. Thanks!
The text was updated successfully, but these errors were encountered: