[RESOLVED] Installing AI Edge Torch

I’m looking to install the new AI Edge Torch package in Python to convert a PyTorch model to tflite. However, when using pip, ai edge torch requires a torch version of 2.4.*, when the latest version is 2.3.1, blocking me from using this package.

Here’s the specific installation command I use, and the error I get:

pip install ai-edge-torch==0.1.1

ERROR: Could not find a version that satisfies the requirement torch==2.4.* (from ai-edge-torch) (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, 2.3.0, 2.3.1) ERROR: No matching distribution found for torch==2.4.*

Environment details:

pip 24.0, Python 3.12.2, torch 2.3.1

macOS Sonoma 14.3.1

Thanks!

Edit: Solved. MacOS requires a nightly build that is different from the linux .whl file in AI Edge Torch’s requirements.txt file. This is the one I found:

cpu/torch-2.4.0.dev20240429-cp311-none-macosx_11_0_arm64.whl

1 Like