-
Notifications
You must be signed in to change notification settings - Fork 770
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
Installation of torch from pytorch CPU index fails with 'no wheels are available with a matching Python ABI' #3437
Comments
Did this work in previous versions? |
I'm not sure about past |
Ah ok, no prob. Mostly was wondering if it was “obviously a regression” from today’s release. |
Not that I know of, but I can later tonight replicate with an older |
Can you try instead using |
It's explained here: #1497 (comment) |
Yeah, that works on $ docker run --rm -ti -v /tmp:/tmp python:3.12 /bin/bash
root@9b29419d1e98:/# curl -LsSf https://astral.sh/uv/install.sh | sh
downloading uv 0.1.41 x86_64-unknown-linux-gnu
installing to /root/.cargo/bin
uv
everything's installed!
To add $HOME/.cargo/bin to your PATH, either restart your shell or run:
source $HOME/.cargo/env (sh, bash, zsh)
source $HOME/.cargo/env.fish (fish)
root@9b29419d1e98:/# . ~/.cargo/env
root@9b29419d1e98:/# uv venv
Using Python 3.12.3 interpreter at: usr/local/bin/python3
Creating virtualenv at: .venv
root@9b29419d1e98:/# . .venv/bin/activate
(.venv) root@9b29419d1e98:/# uv --version
uv 0.1.41
(.venv) root@9b29419d1e98:/# uv pip install --verbose --index-url https://download.pytorch.org/whl/cpu torch==2.3.0+cpu torchvision==0.18.0+cpu torchaudio==2.3.0+cpu &> /tmp/uv_install_cpu_moniker.txt
(.venv) root@9b29419d1e98:/# uv pip list
Package Version
----------------- ----------
filelock 3.13.1
fsspec 2024.2.0
jinja2 3.1.3
markupsafe 2.1.5
mpmath 1.3.0
networkx 3.2.1
numpy 1.26.3
pillow 10.2.0
sympy 1.12
torch 2.3.0+cpu
torchaudio 2.3.0+cpu
torchvision 0.18.0+cpu
typing-extensions 4.9.0
(.venv) root@9b29419d1e98:/#
Huh. That is interesting. I take it that this isn't fully expected, even though there are known differences with regards to local version identifiers? |
I haven't really dug into it. My guess is it relates to some unclear decisions around how PyTorch chooses to publish their wheels (e.g., some variants include |
Marking as |
You can avoid the extra specificity on those depending on uv pip install --index-url https://download.pytorch.org/whl/cpu torch==2.3.0+cpu torchvision torchaudio NOTE: ARM64 needs to omit the
|
I am having almost the same problem, but the issue is
|
Unfortunately that's not enough information for me to fully understand the issue, but you should consider using a constraints file in your second install, with |
Sadly specifying +cpu in constraint doesn't work currently in uv here an example requirements.txt
constraint.txt
when we compile the requirements to check what uv is going to resolve by default without constraints
running the command to install with torch cpu index we get
uv doesn't qualify 2.1.2+cpu as 2.1.* as it is not semver compliant ? |
Thanks, I’ll take a look when I can. The PyTorch stuff is always tricky. |
Yeah, pytorch does things their own way and are not compliant with any
standard :// , they are big enough to gey away with it
I would be glad to contribute if you can point me to the relevant parts
where uv resolves the dependency tree for requirements
…On Sat, Jun 1, 2024, 16:24 Charlie Marsh ***@***.***> wrote:
Thanks, I’ll take a look when I can. The PyTorch stuff is always tricky.
—
Reply to this email directly, view it on GitHub
<#3437 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH4SAFWSOL6VXDXXU76ZLFLZFHKQTAVCNFSM6AAAAABHLV4XW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGQ3DMNRQGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Streamlit uses uv to install dependencies from a requirements.txt file which caused our app to fail. I managed to work around it by pinning the version number as suggested here.
|
uv pip sync requirements.txt
), ideally including the--verbose
flag.uv_install.txt
pip_install.txt
uv_pypi_install.txt
Linux, though applies across platforms.
uv --version
).Related Issues
The text was updated successfully, but these errors were encountered: