Some PyTorch installation methods (especially if you're building from source or dealing with certain dependencies) might require Xcode's Command Line Tools. These tools include compilers and other utilities needed to build software from its source code.
Good question! CUDA is NVIDIA's parallel computing platform and API that enables GPUs to significantly accelerate computations. While your Mac has the MPS (Metal Performance Shaders) backend for hardware acceleration, it doesn't inherently support CUDA.
Interesting! I checked the PyTorch website again and the last version is 2.4, which was released on July 24: github.com/pytorch/pytorch/releases/tag/v2.4.0
@@DrDataScience yes! I am having a weird issue, the python thwt i am getting installed is for x86_64 , I cannot get brew to install the arm64 version, so for x86_64 with rosetta, only 2.2.2 is available
@@DrDataScience I was able to solve this. For some reason brew kept on installing x86_64 version of python, which only has support up to the 2.2.2 pytorch version. I was able to force reinstall brew, and force every install the arm64 version with the "arch --arm64" command. Then I was able to have python compatible with 2.4 version of pytorch.
@@estebann Hi, I got same problem. Already upgrade the brew to latest one, but still can only install 2.2.2 pytorch version. I have downloaded the latest 2.4.1 torch from web, and try to install it by "pip install torch-2.4.1-****.whl", unfortunately it says: ERROR: torch-2.4.1-cp39-none-macosx_11_0_arm64.whl is not a supported wheel on this platform. Not sure why. My MBP is based on M3 sillion.
@@blademeng5368 I spent a couple of hours trying to reinstall brew. I would insist you using "arch --arm64" to force using the ARM version of everything from brew to python. That was the only way. That you can only get 2.2.2 is a tell-tell sign that you are having the exact same issue and for some reason only trying to install x64_64 , for which at this moment the latest version is 2.2.2
Thanks Sir.
Most welcome
what is need for installing Xcode ? can't we install pytorch without that ?
Some PyTorch installation methods (especially if you're building from source or dealing with certain dependencies) might require Xcode's Command Line Tools. These tools include compilers and other utilities needed to build software from its source code.
i using comfyUI and it notification "MPS backend out of memory".Can you help me fix error ?
I see this mps available, but still get CUDA error
AssertionError: Torch not compiled with CUDA enabled
Good question! CUDA is NVIDIA's parallel computing platform and API that enables GPUs to significantly accelerate computations. While your Mac has the MPS (Metal Performance Shaders) backend for hardware acceleration, it doesn't inherently support CUDA.
tensor.to('mps') if torch.backends.mps.is_available() and torch.backends.mps.is_built()
For some reason I can only see and install pytorch 2.2.2 as latest. I am on same python version, Sonoma 14.5, M3 24gb.
Interesting! I checked the PyTorch website again and the last version is 2.4, which was released on July 24: github.com/pytorch/pytorch/releases/tag/v2.4.0
@@DrDataScience yes! I am having a weird issue, the python thwt i am getting installed is for x86_64 , I cannot get brew to install the arm64 version, so for x86_64 with rosetta, only 2.2.2 is available
@@DrDataScience I was able to solve this. For some reason brew kept on installing x86_64 version of python, which only has support up to the 2.2.2 pytorch version. I was able to force reinstall brew, and force every install the arm64 version with the "arch --arm64" command. Then I was able to have python compatible with 2.4 version of pytorch.
@@estebann Hi, I got same problem. Already upgrade the brew to latest one, but still can only install 2.2.2 pytorch version. I have downloaded the latest 2.4.1 torch from web, and try to install it by "pip install torch-2.4.1-****.whl", unfortunately it says: ERROR: torch-2.4.1-cp39-none-macosx_11_0_arm64.whl is not a supported wheel on this platform. Not sure why. My MBP is based on M3 sillion.
@@blademeng5368 I spent a couple of hours trying to reinstall brew. I would insist you using "arch --arm64" to force using the ARM version of everything from brew to python. That was the only way. That you can only get 2.2.2 is a tell-tell sign that you are having the exact same issue and for some reason only trying to install x64_64 , for which at this moment the latest version is 2.2.2