.local/bin/env created by installer may conflict with /usr/bin/env
Author: avnfCreated Apr 16, 2026Updated Sep 17, 2026
Labelsbug
Summary
Hello
Installer script of uv creates .local/bin/env file, and adds .local/bin to the PATH as first directory.
Tools which are attempting to find executable by looking for the name of program in every directory listed in PATH may try to execute .local/bin/env instead of /usr/bin/env tool.
Shells like bash are probably smart enough to skip non-executable files; but other tools may try to execute any file with matched name.
I had this issue with SLURM workload manager, when I attempted to start slurm job with 'env' to print environment variables, and it attempted to use .local/bin/env:
$ srun env
[2026-04-16] error: execve(): /home/username/.local/bin/env: Permission denied
What do you think, will it be possible to redesign that solution to prevent the conflict?
Platform
Ubuntu 24.04
Version
uv 0.9.28
Python version
Python 3.12.12
Source: astral-sh/uv