`install_executorch.sh` fails in a fresh uv virtual environment: `No module named pip`
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Domaine
- build-system
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
🐛 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
- Langage dominant
- Python
- Étoiles
- 5.1k
- Forks
- 1.2k
- Merge moyen
- 1 j 18 h
- PR mergées (30 j)
- 668
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de pytorch/executorch
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
pytorch/executorch#24434 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
pytorch/executorch#24410 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement triaged
Difficulté 2/5 Une demi-journée Accessibilité débutants 68/100
pytorch/executorch#21640 ·
Les mainteneurs répondent en général sous 1 jour
-
[CPU] Complex scalar broadcasting fails or returns incorrect resultsPeut-être pris @SofianElmotiem l’a pris aujourd’hui. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
pytorch/executorch#24408 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
module: cuda
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
pytorch/executorch#24353 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de pytorch/executorch
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
microsoft/markitdown#2820 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
yt-project/yt#5624 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
NousResearch/hermes-agent#148376 ·
Les mainteneurs répondent en général sous 1 jour