An error occurred when installing pytorch version 1.7 GPU

Error when installing 1.7 GPU version of pytorch: torch has an invalid wheel,. Dist info directory not found


the reason is that CUDA versions are inconsistent,

Solution 1:

Install torch for CPU version

pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

Solution 2:

conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch

Read More: