根据https://pytorch.org/get-started/previous-versions/#via-pip,执行以下步骤:
pip install torch==0.2.0_4 -f https://download.pytorch.org/whl/cpu/stable
Collecting torch==0.2.0_4
Could not find a version that satisfies the requirement torch==0.2.0_4 (from versions: 0.1.2, 0.1.2.post1, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0)
No matching distribution found for torch==0.2.0_4
如何安装pytorch的旧版本?
conda install pytorch==1.7.1 torchvision cudatoolkit=10.2 -c pytorch
。 - Charlie Parker