安装pytorch过程中输入命令:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torchvision
安装torchvision、torch等三方库都遇到如下错误:
ain>pip install torch
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
试了一个下午,把能用的镜像都换了,python版本也进行了检查3.7.6理论上是可行的,但就是报找不到
错误原因:
输入:
python -c "import struct; print(struct.calcsize('P') * 8)"
打印python位数,发现安装的是32位的,但是pytorch只支持64位的。
解决方法
卸载python,重新下载64位的,最好是3.6以上版本的python。