Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CannoChen opened this issue May 18, 2024 · 24 comments
Labels
triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@CannoChen
Copy link

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 CannoChen reopened this May 18, 2024
@CannoChen
Copy link
Author

supplement info:
mac os version: 14.3

@kirklandsign kirklandsign added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 20, 2024
@kirklandsign
Copy link
Contributor

Hi @CannoChen do you use a new conda environment?

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

@CannoChen
Copy link
Author

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.

@mergennachin
Copy link
Contributor

@CannoChen can you try upgrading pip

pip install --upgrade pip

@CannoChen
Copy link
Author

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

@jktaotao
Copy link

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

@mergennachin
Copy link
Contributor

@jktaotao

Is your Mac x86 based by any chance? If so, pytorch stopped publishing prebuilt pip packages since pytorch 2.3

pytorch/pytorch#114602

I'd recommend installing the pytorch 2.3 from source

@CannoChen
Copy link
Author

CannoChen commented May 30, 2024

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

@keenborder786
Copy link

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

@infung
Copy link

infung commented Jun 11, 2024

same issue. NEED HELP 😿

@ricard0javier
Copy link

Same issue here on mac

@zhangzhenxi
Copy link

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

@AbeerAhmad
Copy link

zhangzhenxi

are you facing this issue in Apple Silicon chip?

@zhangzhenxi
Copy link

are you facing this issue in Apple Silicon chip?

Yes, M3Max

@MightyMoud
Copy link

I'm facing the same issue on M2

@kirklandsign
Copy link
Contributor

Does @zhangzhenxi 's solution work for you?

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

@MightyMoud
Copy link

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

@kingnight
Copy link

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

@zorgy28
Copy link

zorgy28 commented Aug 23, 2024

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

@kirklandsign
Copy link
Contributor

Maybe check python, pip version?

I also see similar issue and workaround from tensorflow/tensorflow#46506 (comment)

@MingyueCheng
Copy link

same issue

@snimavat
Copy link

snimavat commented Sep 14, 2024

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 ?

@CannoChen
Copy link
Author

CannoChen commented Sep 14, 2024 via email

@lvjing2
Copy link

lvjing2 commented Oct 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests