Error installing Torch

I’ve tried to install pytorch like 10 times. I am running windows 10 and python 3.7. I have been able to install other programs, but pytorch refuses to work no matter what I try. I’ve tried pip install pytorch, which returns a huge error, the most important part seeming to be “no module named tools.nnwrap” (I installed the module tools after seeing this error, didnt fix it) I then looked up the error and found the start locally page on the PyTorch website, and that also didn’t work. that returned the error “ERROR: Could not find a version that satisfies the requirement torch==1.2.0+cu92 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.2.0+cu92” or some variation of that depending on the specific settings i chose. I then scrolled down and selected what I thought was right manually, and that threw back “ERROR: torch-1.0.1-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.” To my knowledge, I’ve tried every solution on the internet, and none of them work. Does anyone with more experience know how to help me?

Either you have 32-bit Python or you have multiple Python distributions and mixed them together.
For the first case, you could type in the following command to verify.

python -c "import struct;print( 8 * struct.calcsize('P'))"
# The output should be 64.

For the second case, please type in the following commands.

where python
where pip
# A valid output should be like this.
# C:\python37\python.exe
# C:\python37\scripts\pip.exe
# If they don't match, then you could run the command with a specified pip.
# Suppose the output is
# C:\python37\python.exe
# D:\python37\scripts\pip.exe
# Then you can do
# "C:\python37\scripts\pip.exe" install -f torch==1.2.0+cu92
1 Like

Indeed I had the same problem. I was configuring my new machine and forgot to check if I had a 32-bit or a 64-bit python. Removing the 32-bit and installing the 64-bit version of Python 3.7 solved the problem.

Install via above link. It should work.