Error Installing Torch To Windows 11 Pro

Hi,

I’m new to Torch so please bear with me :slight_smile:

I am trying to install and configure Stable Diffusion AI locally on my PC (Windows 11 Pro x64), following a How-To-Geek article (How to Run Stable Diffusion Locally With a GUI on Windows).

Log story short, I ran into problems, primarily with the installation of Torch. So, after several attempts to fix that, I tried installing Torch separately :slight_smile:

I already have python 6.1 (64bit) installed on my C: drive and used the following command line to install Torch:

pip3 install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

I got all the way through the download and install, then got the error message:

ERROR: Package 'torch' requires a different Python: 3.6.1 not in '>=3.6.2'

I don’t really know what that means. It appears to be suggesting a different version of python, but a casual search suggests people are getting much the same issue with later versions.

What version of python do I need (if that’s even the issue)?

Any help appreciated.

Thanks

James

Python 3.6’s EOL was in Dec. 2021 and the support was dropped from newer PyTorch releases.
Update your Python version and you should be able to install PyTorch.

Hi,

[quote=“ptrblck, post:2, topic:162055, full:true”]Python 3.6’s EOL was in Dec. 2021 and the support was dropped from newer PyTorch releases.
Update your Python version and you should be able to install PyTorch.[/quote]

OK. So I uninstalled Python 3.6x and installed Python 3.10.7 … I checked using “python -V” that the system thinks it is is using that version.

When I now run the command

pip3 install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

I get the error:

ERROR: Could not find a version that satisfies the requirement torch==1.8.1+cu111 (from versions: 1.11.0, 1.11.0+cpu, 1.11.0+cu113, 1.11.0+cu115, 1.12.0, 1.12.0+cpu, 1.12.0+cu113, 1.12.0+cu116, 1.12.1, 1.12.1+cpu, 1.12.1+cu113, 1.12.1+cu116)
ERROR: No matching distribution found for torch==1.8.1+cu111

Should I be using a different python version?

Thanks

James

Sorry, I should have warned you about too new Python versions, since you want to use an older PyTorch release.
1.8.1 wasn’t built for Python 3.10, so if you really need to install this older PyTorch release, use Python 3.9. However, since 1.8.1 is also quite old you should have been able to install it for Python 3.6 in the first place via this wheel:
1.8.1

You could alternatively manually download the desired wheels and pip install them.

Hi,

My apologies for the late reply. Reality caught up with me and I’ve only just benn able to get back to this.

Anyway, I had a load of issues but eventually (after uninstalling everything and cleaning it all up) managed to install it.

So, thanks very much :slight_smile:

James

1 Like