Skip to content

Commit 0c20543

Browse files
committed
jetson-pypi: replace extra-index-url fallback advice with pinned-version install
extra-index-url lets pip pick the best candidate across both indexes, so an unpinned torch could resolve to PyPI's non-Jetson build. Follow the official jetson-ai-lab / pytorch-TensorRT docs instead: install from the Jetson index with a pinned version.
1 parent 90b073a commit 0c20543

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎jetson-pypi/jetson-pypi.zh.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ pip config set global.index-url {{endpoint}}/{{channel}}/+simple
1818

1919
镜像中未收录的普通 PyPI 包会跳转到本站 PyPI 镜像,因此单独使用本镜像即可安装全部依赖。
2020

21-
如果您的站点没有提供该跳转,建议把 PyPI 镜像配为补充源:
21+
如果您的站点没有提供该跳转,未收录的普通 PyPI 包需要显式从 PyPI(镜像)安装。参考 jetson-pypi 官方教程的做法,此时建议锁定版本号,避免 pip 在两个索引间误选到 PyPI 上的非 Jetson 构建:
2222

2323
```{ztmpl lang="bash" input="channel"}
24-
pip config set global.index-url {{endpoint}}/{{channel}}/+simple
25-
pip config set global.extra-index-url https://pypi.org/simple
24+
pip install torch==2.8.0 --index-url {{endpoint}}/{{channel}}/+simple
2625
```
2726

2827
### Astral uv

0 commit comments

Comments
 (0)