最近学习pytorch,按照参考1中步骤安装完Anaconda(Python 3.8Version,64bit),在Anaconda Prompt中安装pytorch时出现如标题所示问题。具体如下:

我电脑环境:win10神州网信版64位,之前未安装过python。解决方法如下:

1. 添加系统变量:右击我的电脑->属性->高级系统设置->“高级”选项卡->环境变量->选中系统变量Path->编辑->新建->输入Anaconda3的安装路径,例如“D:\ProgramData\Anaconda3\Scripts”和“D:\ProgramData\Anaconda3”->一路确定。

2. 在Anaconda Prompt中输入“pip install torch==1.8.0+cpu torchvision==0.9.0+cpu torchaudio==0.8.0 -f https://download.pytorch/whl/torch_stable.html”。具体版本可查询参考4。

3.若下载过程中出现“Downloaded bytes did not match Content-Length ”或“timeout”等提示,可在Anaconda Prompt中输入命令“conda config --set remote_read_timeout_secs 600.0”

参考 1:https://blog.csdn/qq_41821678/article/details/104642905

参考2:https://blog.csdn/qq_41375318/article/details/102483339

参考3:https://pytorch/

参考4:https://pytorch/get-started/previous-versions/

更多推荐

The following packages are not available from current channels(--安装pytorch出现的问题)