executorch icon indicating copy to clipboard operation
executorch copied to clipboard

Not able to set up Executorch(Error: Could not find a version that satisfies the requirement torch==2.3.0)

Open CannoChen opened this issue 1 year ago • 15 comments

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?

CannoChen avatar May 18 '24 06:05 CannoChen

supplement info: mac os version: 14.3

CannoChen avatar May 19 '24 01:05 CannoChen

Hi @CannoChen do you use a new conda environment?

2.3 should be in pypi: https://pypi.org/project/torch/

kirklandsign avatar May 20 '24 17:05 kirklandsign

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 avatar May 21 '24 01:05 CannoChen

@CannoChen can you try upgrading pip

pip install --upgrade pip

mergennachin avatar May 23 '24 17:05 mergennachin

@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.

CannoChen avatar May 24 '24 01:05 CannoChen

same problem in my env platform: macOs 12.7.2 python version: 3.11 pip version: 24.0

jktaotao avatar May 28 '24 09:05 jktaotao

@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 avatar May 28 '24 12:05 mergennachin

@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.

CannoChen avatar May 30 '24 01:05 CannoChen

I am also facing the same issue. I am on Mac OS 11.0.1

keenborder786 avatar Jun 10 '24 16:06 keenborder786

same issue. NEED HELP 😿

infung avatar Jun 11 '24 16:06 infung

Same issue here on mac

ricard0javier avatar Jul 07 '24 10:07 ricard0javier

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())"

miniconda arm version installation guide

zhangzhenxi avatar Jul 18 '24 07:07 zhangzhenxi

zhangzhenxi

are you facing this issue in Apple Silicon chip?

AbeerAhmad avatar Jul 23 '24 17:07 AbeerAhmad

are you facing this issue in Apple Silicon chip?

Yes, M3Max

zhangzhenxi avatar Aug 07 '24 04:08 zhangzhenxi

I'm facing the same issue on M2

MightyMoud avatar Aug 10 '24 00:08 MightyMoud

Does @zhangzhenxi 's solution work for you?

BTW in recent release the torch version is bumped to 2.4.0. Any similar symptom?

kirklandsign avatar Aug 15 '24 07:08 kirklandsign

I just setup things using venv instead of conda and things worked just okay. Not sure what the issue was

MightyMoud avatar Aug 15 '24 10:08 MightyMoud

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

kingnight avatar Aug 22 '24 09:08 kingnight

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.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

zorgy28 avatar Aug 23 '24 17:08 zorgy28

Maybe check python, pip version?

I also see similar issue and workaround from https://github.com/tensorflow/tensorflow/issues/46506#issuecomment-762186573

kirklandsign avatar Aug 23 '24 17:08 kirklandsign

same issue

MingyueCheng avatar Aug 29 '24 13:08 MingyueCheng

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 ?

snimavat avatar Sep 14 '24 13:09 snimavat

 Hi,This is CannoChen.I have received your mail.And then, I will reply to you later.Thank you!

CannoChen avatar Sep 14 '24 13:09 CannoChen

image 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

lvjing2 avatar Oct 24 '24 06:10 lvjing2

同样问题,如果是和我一样从x86的macOS系统完全迁移过来的,删除Homebrew,重新安装,就能安装 torch的更高版本了。 原因应该是Homebrew的x86和arm版本不同,x86版python只能安装 torch (2.2.2)

uninstalled Homebrew for x86

daweilang avatar Jan 21 '25 12:01 daweilang

 Hi,This is CannoChen.I have received your mail.And then, I will reply to you later.Thank you!

CannoChen avatar Jan 21 '25 12:01 CannoChen