问题
First of all i tried command from their main page, that they gave me:
pip3 install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html
Could not find a version that satisfies the requirement torch==1.3.1+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.3.1.+cpu
After this i decided to take available from this list: https://download.pytorch.org/whl/cpu/stable
So at the end i tried something like this
pip3 install torch-1.1.0-cp37-cp37m-win_amd64.whl -f https://download.pytorch.org/whl/torch_stable.html
And now they write that this is not supported wheel on my platform. Wtf? ( I use windows 7, python64, have amd) ( location of python: C:\Python38, location of pip C:\Python38\Scripts )
回答1:
There is no any wheels for Python 3.8 at https://download.pytorch.org/whl/torch_stable.html.
not supported wheel on my platform
This is because the wheel is for Python 3.7.
Advice: downgrade to Python 3.7.
回答2:
Adding to @phd's answer, you could consider installing from source. Note that I have built PyTorch from the source in the past (and it was a mostly straightforward process) but I have not done this on windows or for Python 3.8.
回答3:
windows
-check your system is 32 or 64 bit
-check your python is 32 or 64 bit
match your system and python version
check if pip is installed by
pip --version
install CUDA 10.2(i didn't check for CUDA 11(latest at the time of writing))
got to pytorch and select your the option and copy past the command in cmd
回答4:
pip install numpy
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
来源:https://stackoverflow.com/questions/58901682/could-not-find-a-version-that-satisfies-the-requirement-torch-1-3-1