gpt4 book ai didi

python - 无法在 Windows 上使用 pip 安装 pytorch

转载 作者:行者123 更新时间:2023-12-04 10:59:49 27 4
gpt4 key购买 nike

我正在尝试在 Windows 上安装 Pytorch,我正在使用官方网站的命令
https://pytorch.org/get-started/locally/

pip3 install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html

如果我选择 Windows、Cuda 10.0 和 Python 3.7,这是命令
但是如果我运行它,我会收到错误消息:
ERROR: Could not find a version that satisfies the requirement torch==1.2.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.2.0

那么为什么会发生这种情况呢?
我的 pip 是 19.2 版,我在新安装的 python 3.7 环境中

最佳答案

您的问题最可能的原因是安装了 32 位 python,而 Torch 库依赖于 64 位版本。我有完全相同的问题。

刚开始python从命令行并观察

C:\Users\marci>python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32

我的安装现在显示 64 位。如果 Yours 显示 32,则安装 64 位 python。我用过这个链接: Official python 64-bit Windows installer

关于python - 无法在 Windows 上使用 pip 安装 pytorch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57499002/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com