有没有办法在 python 3.12.0 上安装 pytorch?

Ben*_*ker 9 python pip python-3.x pytorch

我正在使用 制作一个应用程序gpt-neo并尝试安装torch,但它无法安装。

错误信息如下:

C:\Users\Ben>pip install torch
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
Run Code Online (Sandbox Code Playgroud)

有没有torch不用pip就可以安装的方法?

小智 10

如果您使用夜间版本,现在就可以了。

此处的说明https://pytorch.org/,但为了完整性而粘贴到此处

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118


Nit*_*tin 1

好的。我来到这个线程在 vscode 终端上进行研究。

我使用 py 命令创建了虚拟环境

py -3.11 -m venv ai311

如果您想了解更多详细信息,请链接到我的博客文章

https://xeon2k.wordpress.com/2023/12/22/how-to-switch- Between-python-versions-on-vs-code-terminal/