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
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
.
- I had to delete the virtual environment used by hatch (shown in the response of command with
--verbose
option). - Restart things by using
python3.12
.