using 64 Python 3.8
but you downloaded the cp37 whl which is for python 3.7. There is currently no whl file available for python 3.8. So either install from source (probably not recommended), install a different python version or create a virtual environment with python 3.7
Update
There is now: https://download.pytorch.org/whl/cpu/torch-1.4.0%2Bcpu-cp38-cp38-win_amd64.whl
Answer from FlyingTeller on Stack OverflowI'm going through the commands found in this guide https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/install/installrad/windows/install-pytorch.html#.
Namely,
pip install --no-cache-dir ^
https://repo.radeon.com/rocm/windows/rocm-rel-7.2/rocm_sdk_core-7.2.0.dev0-py3-none-win_amd64.whl ^
https://repo.radeon.com/rocm/windows/rocm-rel-7.2/rocm_sdk_devel-7.2.0.dev0-py3-none-win_amd64.whl ^
https://repo.radeon.com/rocm/windows/rocm-rel-7.2/rocm_sdk_libraries_custom-7.2.0.dev0-py3-none-win_amd64.whl ^
https://repo.radeon.com/rocm/windows/rocm-rel-7.2/rocm-7.2.0.dev0.tar.gzand
pip install --no-cache-dir ^
https://repo.radeon.com/rocm/windows/rocm-rel-7.2/torch-2.9.1%2Brocmsdk20260116-cp312-cp312-win_amd64.whl ^
https://repo.radeon.com/rocm/windows/rocm-rel-7.2/torchaudio-2.9.1%2Brocmsdk20260116-cp312-cp312-win_amd64.whl ^
https://repo.radeon.com/rocm/windows/rocm-rel-7.2/torchvision-0.24.1%2Brocmsdk20260116-cp312-cp312-win_amd64.whlBut when I run the second batch of commands, I get the following error message:
"ERROR: torch-2.9.1+rocmsdk20260116-cp312-cp312-win_amd64.whl is not a supported wheel on this platform."
Has anyone encountered a similar situation, and/or know what to do?
using 64 Python 3.8
but you downloaded the cp37 whl which is for python 3.7. There is currently no whl file available for python 3.8. So either install from source (probably not recommended), install a different python version or create a virtual environment with python 3.7
Update
There is now: https://download.pytorch.org/whl/cpu/torch-1.4.0%2Bcpu-cp38-cp38-win_amd64.whl
I faced the similar issue, even if your python version is correct you can still face this problem if you had install 32x instead of 64x
If it is 32-bit you will face the same problem. To check the bit version of python on your system run this
python -c "import struct;print( 8 * struct.calcsize('P'))"
This will return 32 or 64 If it returns 32 change it to 64 and reinstall the PyTorch https://www.python.org/downloads/windows/
Hi all, I'm trying to run PyTorch training on Windows for my computer science dissertation. This is on an AMD RX 9070 XT graphics card and I have been following this installation guide: https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/install/installrad/windows/install-pytorch.html.
It looks like on these documentation pages that this card should now be supported for windows according to: https://www.amd.com/en/resources/support-articles/release-notes/RN-AMDGPU-WINDOWS-PYTORCH-7-1-1.html.
When I try to run the second set of commands for installation in the guide, I'm met with the following error:
ERROR: torch-2.9.0+rocmsdk20251116-cp312-cp312-win_amd64.whl is not a supported wheel on this platform.
Does anyone knows if this is a current issue or what could be wrong with my setup? Here is the hardware setup:
AMD RX 9070 XT, AMD Ryzen 7 9800X3D 8-Core Processor, 64.0 GB RAM
download und install this driver
https://www.amd.com/en/resources/support-articles/release-notes/RN-AMDGPU-WINDOWS-PYTORCH-7-1-1.html
1 - go to [whatever is your path]\ComfyUI_windows_portable, open cmd here so you are in correct folder
2 - enter these commands 1 by 1
.\python_embeded\python.exe -s -m pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-7.1.1/rocm_sdk_core-0.1.dev0-py3-none-win_amd64.whl .\python_embeded\python.exe -s -m pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-7.1.1/rocm_sdk_devel-0.1.dev0-py3-none-win_amd64.whl .\python_embeded\python.exe -s -m pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-7.1.1/rocm_sdk_libraries_custom-0.1.dev0-py3-none-win_amd64.whl .\python_embeded\python.exe -s -m pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-7.1.1/rocm-0.1.dev0.tar.gz and then .\python_embeded\python.exe -s -m pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-7.1.1/torch-2.9.0+rocmsdk20251116-cp312-cp312-win_amd64.whl .\python_embeded\python.exe -s -m pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-7.1.1/torchaudio-2.9.0+rocmsdk20251116-cp312-cp312-win_amd64.whl .\python_embeded\python.exe -s -m pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-7.1.1/torchvision-0.24.0+rocmsdk20251116-cp312-cp312-win_amd64.whl
info taken from https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/install/installrad/windows/install-pytorch.html
With all the new stuff coming out I've been seeing a lot of posts and error threads being opened for various issues with cuda/pytorch/sage attantion/triton/flash attention. I was tired of digging links up so I initially made this as a cheat sheet for myself but expanded it with hopes that this will help some of you get your venvs and systems running smoothly. If you prefer a Gist version, you'll find one here.
In This Guide:
-
Check Installed Python Versions
-
Set Default Python Version by Changing PATH
-
Installing VS Build Tools
-
Check the Currently Active CUDA Version
-
Download and Install the Correct CUDA Toolkit
-
Change System CUDA Version in PATH
-
Install to a VENV
-
Check All Your Dependency Versions Easy
-
Install PyTorch
-
Install Triton
-
Install SageAttention
-
Install FlashAttention
-
Installing A Fresh Venv
-
For ComfyUI Portable Users
-
Other Missing Dependencies
-
Notes
To list all installed versions of Python on your system, open cmd and run:
py -0p
The version number with the asterix next to it is your system default.
2. Set Default System Python Version by Changing PATH
You can have multiple versions installed on your system. The version of Python that runs when you type python is determined by the order of Python directories in your PATH variable. The first python.exe found is used as the default.
Steps:
-
Open the Start menu, search for
Environment Variables, and select Edit system environment variables. -
In the System Properties window, click Environment Variables.
-
Under System variables (or User variables), find and select the
Pathvariable, then click Edit. -
Move the entry for your desired Python version (for example,
C:\Users\<yourname>\AppData\Local\Programs\Python\Python310\and itsScriptssubfolder) to the top of the list, above any other Python versions. -
Click OK to save and close all dialogs.
-
Restart your command prompt and run:python --version
It should now display your chosen Python version.
3. Installing VS Build Tools
The easiest way to install VS Build Tools is using Windows Package Manager (winget). Open a command prompt and run:
winget install --id=Microsoft.VisualStudio.2022.BuildTools -e
For VS Build Tools 2019 (if needed for compatibility):
winget install --id=Microsoft.VisualStudio.2019.BuildTools -e
For VS Build Tools 2015 (rarely needed):
winget install --id=Microsoft.BuildTools2015 -e
After installation, you can verify that VS Build Tools are correctly installed by running: cl.exe or msbuild -version If installed correctly, you should see version information rather than "command not found"
Remeber to restart your computer after installing
For a more detailed guide on VS Build tools see here.
4. Check the Currently Active CUDA Version
To see which CUDA version is currently active, run:
nvcc --version
5. Download and Install the Correct CUDA Toolkit
Note: This is only for the system for self contained environments it's always included.
Download and install from the official NVIDIA CUDA Toolkit page:
https://developer.nvidia.com/cuda-toolkit-archive
Install the version that you need. Multiple version can be installed.
6. Change System CUDA Version in PATH
-
Search for
envin the Windows search bar. -
Open Edit system environment variables.
-
In the System Properties window, click Environment Variables.
-
Under System Variables, locate
CUDA_PATH. -
If it doesn't point to your intended CUDA version, change it. Example value:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4
7. Install to a VENV
From this point to install any of these to a virtual environment you first need to activate it. For system you just skip this part and run as is.
Open a command prompt in your venv/python folder (folder name might be different) and run:
Scripts\activate
You will now see (venv) in your cmd. You can now just run the pip commands as normal.
8. Check All Your Installed Dependency Versions (Easy)
Make or download this versioncheck.py file. Edit it with any text/code editor and paste the code below. Open a CMD to the root folder and run with:
python versioncheck.py
This will print the versions for torch, CUDA, torchvision, torchaudio, CUDA, Triton, SageAttention, FlashAttention. To use this in a VENV activate the venv first then run the script.
import sys
import torch
import torchvision
import torchaudio
print("python version:", sys.version)
print("python version info:", sys.version_info)
print("torch version:", torch.__version__)
print("cuda version (torch):", torch.version.cuda)
print("torchvision version:", torchvision.__version__)
print("torchaudio version:", torchaudio.__version__)
print("cuda available:", torch.cuda.is_available())
try:
import flash_attn
print("flash-attention version:", flash_attn.__version__)
except ImportError:
print("flash-attention is not installed or cannot be imported")
try:
import triton
print("triton version:", triton.__version__)
except ImportError:
print("triton is not installed or cannot be imported")
try:
import sageattention
print("sageattention version:", sageattention.__version__)
except ImportError:
print("sageattention is not installed or cannot be imported")
except AttributeError:
print("sageattention is installed but has no __version__ attribute")This will print the versions for torch, CUDA, torchvision, torchaudio, CUDA, Triton, SageAttention, FlashAttention.
torch version: 2.6.0+cu126 cuda version (torch): 12.6 torchvision version: 0.21.0+cu126 torchaudio version: 2.6.0+cu126 cuda available: True flash-attention version: 2.7.4 triton version: 3.2.0 sageattention is installed but has no version attribute
9. Install PyTorch
Use the official install selector to get the correct command for your system:
Install PyTorch
10. Install Triton
To install Triton for Windows, run:
pip install triton-windows
For a specific version:
pip install triton-windows==3.2.0.post10
3.2.0 post 10 works best for me.
Triton Windows releases and info:
-
Triton Windows Releases
-
Main Triton Readme
-
Special Notes for ComfyUI
-
Test Triton
If you encounter any errors such as: AttributeError: module 'triton' has no attribute 'jit' then head to C:\Users\your-username.triton\ and delete the cache folder.
11. Install Sage Attention
Get the correct prebuilt Sage Attention wheel for your system here:
-
woct0rdho SageAttention Releases
-
sdbds/SageAttention-for-windows Releases
pip install sageattention "path to downloaded wheel"
Example :
pip install sageattention "D:\sageattention-2.1.1+cu124torch2.5.1-cp310-cp310-win_amd64.whl"
`sageattention-2.1.1+cu124torch2.5.1-cp310-cp310-win_amd64.whl`
This translates to being compatible with Cuda 12.4 | Py Torch 2.5.1 | Python 3.10 and 2.1.1 is the SageAttention version.
If you get an error : SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats then make sure to downgrade your triton to v3.2.0-windows.post10. Download whl and install manually with:
CMD into python folder then run :
python.exe -s -m pip install --force-reinstall "path-to-triton-3.2.0-cp310-cp310-win_amd64.whl"
12. Install Flash Attention
Get the correct prebuilt Flash Attention wheel compatible with your python version here:
-
FlashAttention Releases
pip install "path to downloaded wheel"
13. Installing A Fresh Venv
You can install a new python venv in your root folder by using the following command. You can change C:\path\to\python310 to match your required version of python. If you just use python -m venv venv it will use the system default version.
"C:\path\to\python310\python.exe" -m venv venv
To activate and start installing dependencies
your_env_name\Scripts\activate
Most projects will come with a requirements.txt to install this to your venv
pip install -r requirements.txt
14. For ComfyUI Portable Users
The process here is very much the same with one small change. You just need to use the python.exe in the python_embedded folder to run the pip commands. To do this just open a cmd at the python_embedded folder and then run:
python.exe -s -m pip install your-dependency
For Triton and SageAttention
Download correct triton wheel from : https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/whl/
Then run:
python.exe -m pip install --force-reinstall "your-download-folder/triton-3.2.0-cp312-cp312-win_amd64.whl"
git clone https://github.com/thu-ml/SageAttention.git
cd sageattention
your cmd should be E:\Comfy_UI\ComfyUI_windows_portable\python_embeded\sageattention now.
Then finally run:
E:\Comfy_UI\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install .
this will build sageattention and can take a few minutes.
Make sure to edit the run comfy gpu bat file to add flag for sageattention python main.py --use-sage-attention
15. Other Missing Dependencies
If you see any other errors for missing modules for any other nodes/extensions you may want to use it is just a simple case of getting into your venv/standalone folder and installing that module with pip.
Example: No module 'xformers'
pip install xformers
Occasionaly you may come across a stubborn module and you may need to force remove and reinstall without using any cached versions.
Example:
pip uninstall -y xformers
pip install --no-cache-dir --force-reinstall xformers
Notes
-
Make sure all versions (Python, CUDA, PyTorch, Triton, SageAttention) are compatible this is the primary reason for most issues.
-
Each implementation will have its own requirements which is why we use a standalone environment.
-
Restart your command prompt after making changes to environment variables or PATH.
-
If I've missed anything please leave a comment and I will add it to the post.
-
To easily open a cmd prompt at a specific folder browse to the folder you need in file manager then type cmd in the address bar and hit enter.
Update 31st May *Added ComfyUI Triton/Sage
Update 21st April 2025
-
Added Triton & Sage Attention common error fixes
Update 20th April 2025
-
Added VS build tools section
-
Fixed system cuda being optional
Update 19th April 2025
-
Added comfyui portable instructions.
-
Added easy CMD opening to notes.
-
Fixed formatting issues.
So I've had sage and triton working for awhile, but wanted to update them both. I think I have all the prerequisites and triton seems to be working, but I'm getting an error when I try to install Sage.
My config is a 4090 on windows 11. Here is my current version check after I updated python and torch
python version: 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]python version info: sys.version_info(major=3, minor=12, micro=8, releaselevel='final', serial=0)torch version: 2.7.0+cu128cuda version (torch): 12.8torchvision version: 0.22.0+cputorchaudio version: 2.7.0+cpucuda available: Trueflash-attention is not installed or cannot be importedtriton version: 3.3.1sageattention is installed but has no __version__ attribute
Then when I try to install the latest sage I get this:
E:\Comfy_UI\ComfyUI_windows_portable\python_embeded> python.exe -m pip install "sageattention-2.1.1+cu128torch2.7.0-cp311-cp311-win_amd64.whl"
ERROR: sageattention-2.1.1+cu128torch2.7.0-cp311-cp311-win_amd64.whl is not a supported wheel on this platform.
I'm not sure what the problem is, I thought this was the correct wheel unless I misread something.
Any help would be appreciated.
I have been going in circles with many various ways to install and everything is not working in different ways... I cannot recall exactly what tried in what order, there are misc logs of various attempts. 26.1.1 is suppsoed to have an 'ai bundle' option on installation apparently, I can't see any options for it if so, using the most specific links I can find for rx9070xt.
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 15/02/2026 22:36 1701119360 amd-software-adrenalin-edition-25.20.01.17-win11-pytorch-combined.exe
-a---- 15/02/2026 21:25 1690460360 amd-software-adrenalin-edition-26.2.1-win11-c.exe
-a---- 15/02/2026 21:07 1754164768 AMD-Software-PRO-Edition-26.Q1-Win11-For-HIP.exe
-a---- 15/02/2026 22:46 1690311976 whql-amd-software-adrenalin-edition-26.1.1-win11-c.exe
Which of these is meant to be the 'least wrong' option to install now? The 25.20 has the most noise about it but it's now outdated. Nightly rocm and pytorch from therock throws no package found errors. the PRO edition driver is apparently not recommended so I haven't tried yet, but it looks like it should bundle, but then, it was meant to be bundled in my current one, and one before. AI tab exists but no options in there other than launch the already installed ollama.
I can't find much useful anywhere other than 'just install nightlies bro!' and that categorically does not work.
My current Adrenalin version is 26.2.1.
(venv) PS D:\AIWork> pip install --no-cache-dir `
>> "https://rocm.nightlies.amd.com/v2/gfx120X-all/torch-2.10.0a0+rocmsdk20260215-cp312-cp312-win_amd64.whl" `
>> "https://rocm.nightlies.amd.com/v2/gfx120X-all/torchvision-0.25.0a0+rocmsdk20260215-cp312-cp312-win_amd64.whl" `
>> "https://rocm.nightlies.amd.com/v2/gfx120X-all/torchaudio-2.10.0a0+rocmsdk20260215-cp312-cp312-win_amd64.whl"
ERROR: torch-2.10.0a0+rocmsdk20260215-cp312-cp312-win_amd64.whl is not a supported wheel on this platform.
(venv) PS D:\AIWork> pip install --no-deps --force-reinstall `
>> "https://rocm.nightlies.amd.com/v2/gfx120X-all/torch-2.10.0a0+rocmsdk20260215-cp312-cp312-win_amd64.whl"
ERROR: torch-2.10.0a0+rocmsdk20260215-cp312-cp312-win_amd64.whl is not a supported wheel on this platform.
(venv) PS D:\AIWork> pip install --index-url https://rocm.nightlies.amd.com/v2/gfx120X-all/ torch torchaudio torchvision
Looking in indexes: https://rocm.nightlies.amd.com/v2/gfx120X-all/
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
(venv) PS D:\AIWork>
I am at my wits end here, any advice much appreciated!
(My end objectives are ollama usage and comfyui, if it is relevant)