`install_executorch.sh` fails in a fresh uv virtual environment: `No module named pip`
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Bereich
- build-system
Rechercherichtung
Start with install_executorch.sh, then install_executorch.py (the main function around line 216) and install_utils.py (python_is_compatible, around line 398). Those spots call python -m pip install packaging directly. Reproduce by creating a venv with uv venv (no pip) and running the installer. Done means the installer completes in that venv when uv is on PATH, with the pip-only calls falling back to uv pip or an equivalent.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
🐛 Describe the bug
Installing ExecuTorch from source fails in a venv created with uv venv.
uv does not install pip into venv by default. However, the install_executorch.sh invoke python -m pip directly, even when uv is available on PATH.
Steps to reproduce
git clone --recurse-submodules https://github.com/pytorch/executorch.git
cd executorch
uv venv --python 3.12
source .venv/bin/activate
./install_executorch.sh --editable --verbose
Actual behavior
The installer exits with:
/home/user/data/project/executorch-work/3rdparty/executorch/.venv/bin/python3: No module named pip
Traceback (most recent call last):
File "/home/user/data/project/executorch-work/3rdparty/executorch/install_utils.py", line 398, in python_is_compatible
import packaging
ModuleNotFoundError: No module named 'packaging'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/data/project/executorch-work/3rdparty/executorch/./install_executorch.py", line 264, in <module>
main(sys.argv[1:])
File "/home/user/data/project/executorch-work/3rdparty/executorch/./install_executorch.py", line 216, in main
if not python_is_compatible():
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/data/project/executorch-work/3rdparty/executorch/install_utils.py", line 400, in python_is_compatible
subprocess.run(
File "/home/user/.local/share/uv/python/cpython-3.12.13-linux-aarch64-gnu/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/user/data/project/executorch-work/3rdparty/executorch/.venv/bin/python3', '-m', 'pip', 'install', 'packaging']' returned non-zero exit status 1.
The first failure occurs during the Python compatibility check, when the installer attempts to bootstrap packaging:
python -m pip install packaging
Installing packaging beforehand with uv is insufficient, since subsequent dependency and package installation steps also invoke pip directly.
Expected behavior
The installer should work in a default uv venv without requiring users to install pip manually. When pip is unavailable and uv is on PATH, it should use uv to install dependencies into the active Python environment.
Workaround
Manually install pip before running the installer:
uv pip install pip
./install_executorch.sh --editable --verbose
Related: #15907
Versions
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCm SDK used to build PyTorch: N/A
HIP used to build PyTorch: N/A
OS: Ubuntu 24.04.5 LTS (aarch64)
GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version: Could not collect
CMake version: version 3.28.3
Libc version: glibc-2.39
Python version: 3.12.13 (main, Apr 14 2026, 14:26:08) [Clang 22.1.3 ] (64-bit runtime)
Python platform: Linux-7.0.0-1024-nvidia-aarch64-with-glibc2.39
Is CUDA available: N/A
CUDA runtime version: 13.0.88
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GB10
Nvidia driver version: 580.178.04
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_precompiled.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_tensor_ir.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_ext.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_graph.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_heuristic.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops.so.9.27.0
Is XPU available: N/A
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Caching allocator config: N/A
CPU:
Architecture: aarch64
CPU op-mode(s): 64-bit
Byte Order: Little Endian
CPU(s): 20
On-line CPU(s) list: 0-19
Vendor ID: ARM
Model name: Cortex-X925
Model: 1
Thread(s) per core: 1
Core(s) per socket: 10
Socket(s): 1
Stepping: r0p1
Frequency boost: disabled
CPU(s) scaling MHz: 100%
CPU max MHz: 3900.0000
CPU min MHz: 1378.0000
BogoMIPS: 2000.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti ecv afp wfxt
Model name: Cortex-A725
Model: 1
Thread(s) per core: 1
Core(s) per socket: 10
Socket(s): 1
Stepping: r0p1
CPU(s) scaling MHz: 100%
CPU max MHz: 2808.0000
CPU min MHz: 338.0000
BogoMIPS: 2000.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti ecv afp wfxt
L1d cache: 1.3 MiB (20 instances)
L1i cache: 1.3 MiB (20 instances)
L2 cache: 25 MiB (20 instances)
L3 cache: 24 MiB (2 instances)
NUMA node(s): 1
NUMA node0 CPU(s): 0-19
Vulnerability Gather data sampling: Not affected
Vulnerability Ghostwrite: Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Old microcode: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Mitigation; CSV2, BHB
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Not affected
Versions of relevant libraries:
[pip3] Could not collect
[conda] Could not collect
- Vorherrschende Sprache
- Python
- Sterne
- 5.1k
- Forks
- 1.2k
- Ø Merge
- 1 T. 22 Std.
- Gemergte PRs (30 T.)
- 675
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus pytorch/executorch
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
pytorch/executorch#24434 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
pytorch/executorch#24410 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement triaged
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 68/100
pytorch/executorch#21640 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
pytorch/executorch#24502 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Optimized le.Tensor_out returns b <= a for reverse-argument broadcastsEvtl. vergeben @SofianElmotiem hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
pytorch/executorch#24485 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in pytorch/executorch
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
area:docs documentation effort:M ready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
mczielinski/ob-analytics#423 ·
Maintainer antworten meist innerhalb von 1 Tag
-
infra
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 3 Tagen
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
vllm-project/vllm-ascend#21033 ·
Maintainer antworten meist innerhalb von 1 Tag