MAC inter processors cannot install torch2.5.1

When I run a program, the program reports an error:
AttributeError: module ‘torch.compiler’ has no attribute ‘is_compiling’.
So I want to upgrade torch2.2.2 to 2.5.1, but I can’t install 2.5.1 with the pip command, error information:
ERROR: Could not find a version that satisfies the requirement torch==2.5.1 (from versions: 2.0.0 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==2.5.1

1 Like

Which Python version are you using?

I’m facing the same issue. I’m having python 3.9.6.

Moreover, I was trying to do the installation via hatch rather than the pip directly. But this works in ubuntu, the problem is just with the mac.

Turned out that my hatch was using python 13. You can see that when you run
hatch --verbose run app:main.

  1. I had to delete the virtual environment used by hatch (shown in the response of command with --verbose option).
  2. Restart things by using python3.12.

I have the same problem. I have Python 3.12.2, MacOS.

1 Like

I encountered the same issue. I uninstalled Anaconda, deleted the cached Conda environment files, reinstalled Anaconda, and was then able to successfully install torch 2.6.0.