Python pip:如何使用版本指示器和指定的字符串安装?

huangapple go评论89阅读模式
英文:

Python pip: how to install with version indicator and specified string?

问题

当我想要pip install torch>=1.13.0并指定cpu包时,我该怎么做?

英文:

Take PyTorch for example.

In its index page many different versions of a same release are showed:

  • 2.0.0+cpu
  • 2.0.0
  • 2.0.0+cu117
  • 2.0.0+cu118
  • 2.0.0+rocm5.3

What should I do if I want to pip install torch>=1.13.0 and specify the cpu package?

答案1

得分: 0

尝试这段代码:

pip install torch>=1.13.0+cpu -f 网址太长无法在此处写出

网址:https://download.pytorch.org/whl/torch/stable.html

英文:

Try this code

pip install torch>=1.13.0+cpu -f the url is too long to write here

url : https://download.pytorch.org/whl/torch/stable.html

huangapple
  • 本文由 发表于 2023年4月17日 03:49:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76030009.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定