最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - How to install CPU only version of pytorch using setuptools backed pyproject.toml - Stack Overflow

programmeradmin2浏览0评论

Consider the following pyproject.toml

[build-system]
requires = ["setuptools>=75", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "test"
version = "0.0.1-dev"
requires-python = ">=3.9"
dependencies = [
    "tensorflow-cpu>=2.18",
    "torch-cpu>=2.6",
]

How can I install a CPU only version of pytorch here? torch-cpu doesn't exist.

I found a poetry based solutionenter link description here here but couldn't make it work with setuptools.

I added the following to my pyproject but it still ended up downloading cuda based libraries.

[tool.uv.sources]
torch = { index = "pytorch" }

[[tool.uv.index]]
name = "pytorch"
url = ";
发布评论

评论列表(0)

  1. 暂无评论