Skip to content

What is the pixi equilvalent to pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu? #1714

Answered by asmith26
asmith26 asked this question in Q&A
Discussion options

You must be logged in to vote

I've got it working:

Option 1 (easier)

Following https://pixi.sh/v0.22.0/reference/configuration/#the-pypi-options-table, add to pyproject.toml:

[tool.pixi.pypi-options]
index-url = "https://pypi.org/simple"
extra-index-urls = ["https://download.pytorch.org/whl/cpu"]

Option 2 (more work)

Following https://pixi.sh/v0.22.0/reference/configuration/#pypi-dependencies, pass in the appropriate URL (within pyproject.toml, e.g.

torch = { url = "https://download.pytorch.org/whl/cpu/torch-2.4.0%2Bcpu-cp312-cp312-linux_x86_64.whl#sha256=78dbf5f2789933a7ea2dabeead4daa44679b1e0d8eb35ddb7071c8ab7b181eb3" }

Thanks again for an amazing lib!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by asmith26
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants