简体   繁体   English

如何修复 windows 虚拟环境上的 Pytorch 安装错误,错误提示无法从 Z62AD1C2A46C5298DBAZE2 命令找到 Pytorch?

[英]How do I fix a Pytorch install error on a windows virtual environment with an error that says Pytorch could not be found from a pip command?

Thank you for taking the time to look at this thread.感谢您抽出宝贵时间查看此线程。 I am running windows 11 and created a virtual environment that was setup with Python 3.10.2.我正在运行 windows 11 并创建了一个使用 Python 3.10.2 设置的虚拟环境。 I installed jupyter notebook, tensorflow, CUDA 11.6 toolkit, and cuDNN 8.3.2.我安装了 jupyter notebook、tensorflow、CUDA 11.6 工具包和 cuDNN 8.3.2。 I went to the PyTorch website and clicked the long term stable version of PyTorch for windows using Pip on the CUDA 11.1 option. I went to the PyTorch website and clicked the long term stable version of PyTorch for windows using Pip on the CUDA 11.1 option.

This produced the following Pip command:这产生了以下 Pip 命令:

pip3 install torch==1.8.2+cu111 torchvision==0.9.2+cu111 torchaudio===0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html

I ran this command inside of my terminal as well as the jupyter notebook whose kernel was connected to my virtual environment and received the following error:我在我的终端以及 kernel 连接到我的虚拟环境的 jupyter 笔记本中运行了这个命令,并收到以下错误:

ERROR: Could not find a version that satisfies the requirement torch==1.8.2+cu111 (from versions: none)
ERROR: No matching distribution found for torch==1.8.2+cu111

Does anybody have any advice that could help me solve this issue?有没有人有任何建议可以帮助我解决这个问题? I am running a machine with a GTX 2060 and an AMD Ryzen processor.我正在运行一台配备 GTX 2060 和 AMD Ryzen 处理器的机器。 To my knowledge, I should be able to run CUDA with my GPU.据我所知,我应该能够用我的 GPU 运行 CUDA。 I attempted to troubleshoot the issue by using the stable version of PyTorch as well but still received the same error.我也尝试使用稳定版本的 PyTorch 来解决问题,但仍然收到相同的错误。

Thank you.谢谢你。

OK, well now I feel silly.好吧,现在我觉得很傻。 I went back to the PyTorch website and saw that PyTorch only works up to Python 3.9 as of today in case anyone else runs into a similar issue.我回到 PyTorch 网站,发现 PyTorch 仅适用于 Python 3.9,以防万一其他人遇到类似问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM