-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 pip install gdal
fails to build, with workaround (Windows)
#11466
Comments
Can you share verbose logs? e.g., |
Oh I see, they don't publish wheels to PyPi there are just prebuilt ones elsewhere? You can add a platform specific source URL source if you want this to work with
I think what you're doing for Ideally the project would publish wheels to PyPi, or that other project would publish the wheels under a different name or static package index. |
Thanks for the feedback! Can the dependency by url be used in a pep723 style script header? I love the |
Edit: Realized Generally, I think it's easier to install Would be great if there was a way to add the
Would be great to see something similar with |
Yes we'll read
|
We would like to move all our Python users to uv instead of conda-forge. The only thing missing on Windows is GDAL which is a requirement for a lot of our users. Would be great to find a solution! |
GDAL binary wheels can be found on https://github.com/cgohlke/geospatial-wheels and you can use this low-level solution
But how do you get a better uv-native solution using uv add/sync etc? |
As mentioned above, it sounds like
should work? |
Sorry, that was my fault. They only host wheels for Linux on |
I see. I'm sorry to say this is a problem with the package — there's not much we can do here. See #11466 (comment) for adding the link to the wheel to your |
I wonder if @cgohike could create a flat list of links to package files as requires by https://docs.astral.sh/uv/reference/settings/#find-links 🤔 Then I guess we would be good to go. @zanieb, the regular release assets in https://github.com/cgohlke/geospatial-wheels/releases cannot be used in find-links, right? (I could not get it to work) |
The 2nd script below will build the flat list of links from a Github assets list, re: #11466 (comment), what is the syntax using test-gdal.py:
yields:
list_github_assets.py: # /// script
# requires-python = ">=3.8"
# dependencies = [
# "httpx",
# ]
# ///
import sys
import httpx
def fetch_assets(repo: str):
"""Fetch asset URLs from the latest GitHub release."""
url = f"https://api.github.com/repos/{repo}/releases/latest"
response = httpx.get(url, timeout=10)
response.raise_for_status()
assets = response.json().get("assets", [])
for asset in assets:
print(asset["browser_download_url"])
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: uv run list_github_assets.py <PROJECT/REPO>\n\t", file=sys.stderr)
print("uv run list_github_assets.py cgohlke/geospatial-wheels", file=sys.stderr)
sys.exit(1)
fetch_assets(sys.argv[1]) |
Summary
I'm not sure this is actually a uv problem, but I didn't find it documented in one place anywhere so I'm doing that here. Close if there isn't anything uv should do about this scenario; the workaround will still be here for future searchers to build on.
Problem:
Workaround solution - install a binary prebuilt wheel instead of pypi package:
cp311
is python 3.11,cp313
is py 3.13, etc.win32
,arm64
,amd64
What could/should uv do for this scenario?
Sources:
Platform
MSYS_NT-10.0-19045 3.4.10-2e2ef940.x86_64 x86_64 Msy
Version
uv 0.5.30 (ddbc6e3 2025-02-10)
Python version
Python 3.11.11
The text was updated successfully, but these errors were encountered: