Closed frostming closed 2 hours ago
ok, the issue actually lies in uv venv
, where it should not resolve symlinks for the python executable passed in:
$ uv venv .venv -p /opt/homebrew/opt/python@3.12/bin/python3
$ ls -l .venv/bin/python
lrwxr-xr-x 1 fming staff 96B 9 23 11:56 .venv/bin/python -> /opt/homebrew/Cellar/python@3.12/3.12.6/Frameworks/Python.framework/Versions/3.12/bin/python3.12
I believe this is a duplicate of https://github.com/astral-sh/uv/issues/1640
And yeah, sorry this sounds painful.
Yeah, that is duplicate. Closing this now.
On a macos machine with homebrew python installed, when installing executables using
uv tool install
, the base interpreter of the venv points to a python inside homebrew's version directory, for example:And the
bin/python
also symlinks to the same interpreter.This is subject to breakage when users upgrade the version of
python@3.12
formula, because the new intepreter will be in a different directory. It's a huge pain when user runbrew upgrade
and suddenly all venvs become broken.To compare, this is what pipx creates: