Not able to set up Executorch(Error: Could not find a version that satisfies the requirement torch==2.3.0)
I followed the guidelines on the tutorial(https://pytorch.org/executorch/stable/getting-started-setup) to set up my development environment. But it always shows an error: ERROR: Could not find a version that satisfies the requirement torch==2.3.0 (from executorch) (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 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.3
My environment info:
- platform: macOS(m3)
- python version: 3.10.0
- pip version: 24.0
- torch version: 2.2.2
How to solve this problem?
supplement info: mac os version: 14.3
Hi @CannoChen do you use a new conda environment?
2.3 should be in pypi: https://pypi.org/project/torch/
Hi @CannoChen do you use a new conda environment?
2.3 should be in pypi: https://pypi.org/project/torch/
Yes, all the steps are following the tutorial.
@CannoChen can you try upgrading pip
pip install --upgrade pip
@mergennachin I tried everything i can do. But this issue cant solved. So i exchange my os to Ubuntu20.04. It works!
it look like a bug for macos.
same problem in my env platform: macOs 12.7.2 python version: 3.11 pip version: 24.0
@jktaotao
Is your Mac x86 based by any chance? If so, pytorch stopped publishing prebuilt pip packages since pytorch 2.3
https://github.com/pytorch/pytorch/issues/114602
I'd recommend installing the pytorch 2.3 from source
@mergennachin
Why would you think installing pytorch yourself would work? The fact is that we need a clean virtual environment if we follow the executorch tutorial. If pytorch is installed in the environment beforehand, some errors will occur!!! This is what I've learned through practice.
On the other hand. When we run git submodule update --init, it reinstalls pytorch for our environment, regardless of whether our environment contains it or not. This is what triggers the error.
I am also facing the same issue. I am on Mac OS 11.0.1
same issue. NEED HELP 😿
Same issue here on mac
In my case, I installed python 3.12 by miniconda, and then found out installed python's arch is x86, and then found out my miniconda installation messed up.
I simply fully uninstalled the x86 version of miniconda, then installed arm64 version of miniconda, then torch 2.3.0 installed without issue!
how to check installed python arch
python -c "import platform; print(platform.machine())"
zhangzhenxi
are you facing this issue in Apple Silicon chip?
are you facing this issue in Apple Silicon chip?
Yes, M3Max
I'm facing the same issue on M2
Does @zhangzhenxi 's solution work for you?
BTW in recent release the torch version is bumped to 2.4.0. Any similar symptom?
I just setup things using venv instead of conda and things worked just okay. Not sure what the issue was
any new suggestion for solving this problem? @MightyMoud M I have tried venv, problem not solved
python3 -m venv myenv
source myenv/bin/activate
pip install torch==2.4.0
ERROR: Could not find a version that satisfies the requirement torch==2.4.0 (from versions: 2.2.0, 2.2.1, 2.2.2) ERROR: No matching distribution found for torch==2.4.0
Same issue
any new suggestion for solving this problem? @MightyMoud M I have tried venv, problem not solved
python3 -m venv myenv source myenv/bin/activate pip install torch==2.4.0ERROR: Could not find a version that satisfies the requirement torch==2.4.0 (from versions: 2.2.0, 2.2.1, 2.2.2) ERROR: No matching distribution found for torch==2.4.0
Same issue
Maybe check python, pip version?
I also see similar issue and workaround from https://github.com/tensorflow/tensorflow/issues/46506#issuecomment-762186573
same issue
Same issue here, tried for python 3.10 and 3.11 Can not find/install torch 2.4.1
pip index versions torch
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
torch (2.2.2)
Available versions: 2.2.2, 2.2.1, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.1, 2.0.0, 1.13.1, 1.13.0, 1.12.1, 1.12.0, 1.11.0
Mac 12.5 : Intel
Any solution ?
Hi,This is CannoChen.I have received your mail.And then, I will reply to you later.Thank you!
this maby be the reason, those list in
https://download.pytorch.org/whl/torch/ do not have the whl for you machine.
for example, there is no whl for macos + intel version
同样问题,如果是和我一样从x86的macOS系统完全迁移过来的,删除Homebrew,重新安装,就能安装 torch的更高版本了。 原因应该是Homebrew的x86和arm版本不同,x86版python只能安装 torch (2.2.2)
uninstalled Homebrew for x86
Hi,This is CannoChen.I have received your mail.And then, I will reply to you later.Thank you!