executorch icon indicating copy to clipboard operation
executorch copied to clipboard

Installing v0.3.0 fails because torchvision 0.19.0 requires torch==2.4.1

Open grisaitis opened this issue 1 year ago • 5 comments

🐛 Describe the bug

the issue

I'm getting the following dependency conflict error when I attempt to install executorch v0.3.0 on my arm64 macos system:

./install_requirements.sh --pybind xnnpack
ERROR: Cannot install executorch and executorch==0.3.0a0+7d77d78 because these package versions have conflicting dependencies.

The conflict is caused by:
    executorch 0.3.0a0+7d77d78 depends on torch==2.4.0
    torchaudio 2.4.0 depends on torch==2.4.0
    torchvision 0.19.0 depends on torch==2.4.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

maybe torchvision 0.19.0 bumped the version of torch it requires? not sure.

steps to reproduce

pyenv shell miniconda3-latest
# below taken from https://pytorch.org/executorch/stable/getting-started-setup.html
conda create -yn executorch-v0.3.0 python=3.10.0
conda activate executorch-v0.3.0
git clone --branch v0.3.0 https://github.com/pytorch/executorch.git executorch-v0.3.0
cd executorch-v0.3.0
git submodule sync
git submodule update --init
./install_requirements.sh --pybind xnnpack

Versions

Collecting environment information... PyTorch version: N/A Is debug build: N/A CUDA used to build PyTorch: N/A ROCM used to build PyTorch: N/A

OS: macOS 14.4.1 (arm64) GCC version: Could not collect Clang version: 15.0.0 (clang-1500.3.9.4) CMake version: Could not collect Libc version: N/A

Python version: 3.10.0 (default, Mar 3 2022, 03:54:28) [Clang 12.0.0 ] (64-bit runtime) Python platform: macOS-14.4.1-arm64-arm-64bit Is CUDA available: N/A CUDA runtime version: Could not collect CUDA_MODULE_LOADING set to: N/A GPU models and configuration: Could not collect Nvidia driver version: Could not collect cuDNN version: Could not collect HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: N/A

CPU: Apple M1

Versions of relevant libraries: [pip3] No relevant packages [conda] No relevant packages

grisaitis avatar Aug 30 '24 20:08 grisaitis

have the same issue

alexdmukh avatar Sep 05 '24 09:09 alexdmukh

@GregoryComer or @dbort Can you take a look?

JacobSzwejbka avatar Sep 05 '24 16:09 JacobSzwejbka

I am also using ARM macOS. When you come across the issue above, consider trying this method:

  1. Run pip install torchvision==0.19.0
  2. Run ./install_requirements.sh --pybind xnnpack again Done

phamnhuvu-dev avatar Sep 16 '24 19:09 phamnhuvu-dev

Same issue with MPS on M1:

ERROR: Cannot install executorch, executorch==0.3.0a0+ca8e0d2 and torchvision==0.19.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    executorch 0.3.0a0+ca8e0d2 depends on torch==2.4.0
    torchaudio 2.4.0 depends on torch==2.4.0
    torchvision 0.19.0 depends on torch==2.4.1

Here's the entire debug:

./install_requirements.sh --pybind mps

Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/test/cpu
Requirement already satisfied: torch==2.4.1 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (2.4.1)
Requirement already satisfied: torchvision==0.19.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (0.19.0)
Requirement already satisfied: cmake in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (3.30.4)
Requirement already satisfied: pip>=23 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (24.2)
Requirement already satisfied: pyyaml in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (6.0.2)
Requirement already satisfied: setuptools>=63 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (75.1.0)
Requirement already satisfied: tomli in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (2.0.2)
Requirement already satisfied: wheel in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (0.44.0)
Requirement already satisfied: zstd in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (1.5.5.1)
Requirement already satisfied: timm==0.6.13 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (0.6.13)
Requirement already satisfied: torchaudio==2.4.1 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (2.4.1)
Requirement already satisfied: torchsr==1.0.4 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (1.0.4)
Requirement already satisfied: transformers==4.38.2 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (4.38.2)
Requirement already satisfied: filelock in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.1) (3.16.1)
Requirement already satisfied: typing-extensions>=4.8.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.1) (4.12.2)
Requirement already satisfied: sympy in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.1) (1.13.3)
Requirement already satisfied: networkx in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.1) (3.3)
Requirement already satisfied: jinja2 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.1) (3.1.4)
Requirement already satisfied: fsspec in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.1) (2024.9.0)
Requirement already satisfied: numpy in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torchvision==0.19.0) (2.1.1)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torchvision==0.19.0) (10.4.0)
Requirement already satisfied: huggingface-hub in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from timm==0.6.13) (0.25.1)
Requirement already satisfied: packaging>=20.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from transformers==4.38.2) (24.1)
Requirement already satisfied: regex!=2019.12.17 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from transformers==4.38.2) (2024.9.11)
Requirement already satisfied: requests in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from transformers==4.38.2) (2.32.3)
Requirement already satisfied: tokenizers<0.19,>=0.14 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from transformers==4.38.2) (0.15.2)
Requirement already satisfied: safetensors>=0.4.1 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from transformers==4.38.2) (0.4.5)
Requirement already satisfied: tqdm>=4.27 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from transformers==4.38.2) (4.66.5)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from jinja2->torch==2.4.1) (2.1.5)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from requests->transformers==4.38.2) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from requests->transformers==4.38.2) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from requests->transformers==4.38.2) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from requests->transformers==4.38.2) (2024.8.30)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from sympy->torch==2.4.1) (1.3.0)
Using pip 24.2 from /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages/pip (python 3.10)
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/test/cpu
Processing /Users/laptop/Projects/Software/Python/executorch
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating /private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info
  writing /private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/PKG-INFO
  writing dependency_links to /private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/dependency_links.txt
  writing entry points to /private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/entry_points.txt
  writing requirements to /private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/requires.txt
  writing top-level names to /private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/top_level.txt
  writing manifest file '/private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/SOURCES.txt'
  reading manifest file '/private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/SOURCES.txt'
  adding license file 'LICENSE'
  writing manifest file '/private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch.egg-info/SOURCES.txt'
  creating '/private/var/folders/fh/mqzmphh50tzf3jwwmfjw0w0h0000gq/T/pip-modern-metadata-kokls5_o/executorch-0.3.0a0+ca8e0d2.dist-info'
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: expecttest in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (0.2.1)
Requirement already satisfied: flatbuffers in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (24.3.25)
Requirement already satisfied: hypothesis in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (6.112.2)
Requirement already satisfied: mpmath==1.3.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (1.3.0)
Requirement already satisfied: numpy>=1.25.2 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (2.1.1)
Requirement already satisfied: packaging in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (24.1)
Requirement already satisfied: pandas in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (2.2.3)
Requirement already satisfied: parameterized in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (0.9.0)
Requirement already satisfied: pytest in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (8.3.3)
Requirement already satisfied: pytest-xdist in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (3.6.1)
Requirement already satisfied: pyyaml in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (6.0.2)
Requirement already satisfied: ruamel.yaml in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (0.18.6)
Requirement already satisfied: sympy in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (1.13.3)
Requirement already satisfied: tabulate in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (0.9.0)
Collecting torch==2.4.0 (from executorch==0.3.0a0+ca8e0d2)
  Using cached https://download.pytorch.org/whl/test/cpu/torch-2.4.0-cp310-none-macosx_11_0_arm64.whl (62.1 MB)
Requirement already satisfied: torchvision==0.19.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from executorch==0.3.0a0+ca8e0d2) (0.19.0)
Collecting torchaudio==2.4.0 (from executorch==0.3.0a0+ca8e0d2)
  Using cached https://download.pytorch.org/whl/test/cpu/torchaudio-2.4.0-cp310-cp310-macosx_11_0_arm64.whl (1.8 MB)
Requirement already satisfied: filelock in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.0->executorch==0.3.0a0+ca8e0d2) (3.16.1)
Requirement already satisfied: typing-extensions>=4.8.0 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.0->executorch==0.3.0a0+ca8e0d2) (4.12.2)
Requirement already satisfied: networkx in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.0->executorch==0.3.0a0+ca8e0d2) (3.3)
Requirement already satisfied: jinja2 in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.0->executorch==0.3.0a0+ca8e0d2) (3.1.4)
Requirement already satisfied: fsspec in /Users/laptop/miniforge3/envs/executorch/lib/python3.10/site-packages (from torch==2.4.0->executorch==0.3.0a0+ca8e0d2) (2024.9.0)
INFO: pip is looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install executorch, executorch==0.3.0a0+ca8e0d2 and torchvision==0.19.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    executorch 0.3.0a0+ca8e0d2 depends on torch==2.4.0
    torchaudio 2.4.0 depends on torch==2.4.0
    torchvision 0.19.0 depends on torch==2.4.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

kamalWam avatar Oct 03 '24 10:10 kamalWam

Can you try pulling? We upgraded to torch 2.6 very recently

jackzhxng avatar Oct 03 '24 18:10 jackzhxng

On M1, the only ones I see available are:

torch (2.4.1)
Available versions: 2.4.1, 2.4.0, 2.3.1, 2.3.0, 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
The conflict is caused by:
    executorch 0.3.0a0+7d77d78 depends on torch==2.4.0
    torchaudio 2.4.0 depends on torch==2.4.0
    torchvision 0.19.0 depends on torch==2.4.1

So ./install_requirements.sh fails regardless of backend.

kamalWam avatar Oct 04 '24 12:10 kamalWam

All of the packages involved here have had a few releases since this issue was originally reported. I'm going to close this in the hopes that it's working with executorch 0.5 and later, but please re-open with details if it's still happening. Apologies that we didn't get to the bottom of it at the time.

dbort avatar Feb 08 '25 02:02 dbort