Skip to content

Commit 094b3c4

Browse files
authored
Fix installation that causes torch conflict (#13074)
Looking into resolving this: pytorch/pytorch#159599 A package in requirements-examples.txt had a dependency on torchvision, and we ended up installing stable release from standard pypi package. And transitively we ended up installing stable torch and uninstalling existing torch nightly. We just need to swap the installation (first install domain libraries and torch) and then necessary examples packages. Test Plan: `python ./install_requirements.sh --example` Outputs ``` (executorch_test_9) mnachin@mnachin-mbp executorch % pip freeze | grep torch pytorch_tokenizers @ file:///Users/mnachin/executorch/extension/llm/tokenizers torch==2.9.0.dev20250725 torchao @ file:///Users/mnachin/executorch/third-party/ao torchaudio==2.8.0.dev20250725 torchdata==0.11.0 torchsr==1.0.4 torchtune==0.6.1 torchvision==0.24.0.dev20250725 ```
1 parent 48e4822 commit 094b3c4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

install_requirements.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,6 @@ def install_requirements(use_pytorch_nightly):
142142

143143

144144
def install_optional_example_requirements(use_pytorch_nightly):
145-
print("Installing packages in requirements-examples.txt")
146-
subprocess.run(
147-
[
148-
sys.executable,
149-
"-m",
150-
"pip",
151-
"install",
152-
"-r",
153-
"requirements-examples.txt",
154-
],
155-
check=True,
156-
)
157-
158145
print("Installing torch domain libraries")
159146
DOMAIN_LIBRARIES = [
160147
(
@@ -178,6 +165,19 @@ def install_optional_example_requirements(use_pytorch_nightly):
178165
check=True,
179166
)
180167

168+
print("Installing packages in requirements-examples.txt")
169+
subprocess.run(
170+
[
171+
sys.executable,
172+
"-m",
173+
"pip",
174+
"install",
175+
"-r",
176+
"requirements-examples.txt",
177+
],
178+
check=True,
179+
)
180+
181181

182182
# Prebuilt binaries for Intel-based macOS are no longer available on PyPI; users must compile from source.
183183
# PyTorch stopped building macOS x86_64 binaries since version 2.3.0 (January 2024).

0 commit comments

Comments
 (0)