uv: Windows: uv doesn't find python versions on PATH

I installed Python using pyenv-win but puffin can’t find it (because it’s not in the PATH). Running python from the command line works as expected and starship recognises it correctly too.

❯ python -V
Python 3.12.0

puffin on  main [?] is 📦 v0.0.4 via 🐍 v3.12.0 via 🦀 v1.75.0
❯ where.exe python
C:\Users\Micha\.pyenv\pyenv-win\shims\python
C:\Users\Micha\.pyenv\pyenv-win\shims\python.bat
C:\Users\Micha\AppData\Local\Microsoft\WindowsApps\python.exe

py --list-paths
 -V:IronPython/3.4 * C:\Program Files\IronPython 3.4\ipy.exe
 -V:IronPython/3.4-32 C:\Program Files\IronPython 3.4\ipy32.exe

puffin venv
  × Could not find `python.exe` in PATH and `py --list-paths` did not list any Python versions. Is Python installed?

Probably related to https://github.com/astral-sh/puffin/issues/1168

Work around: use pyenv which python and pass the path explicitly puffin pip -p <path_shown_by_pyenv_which>

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 20 (15 by maintainers)

Most upvoted comments

We do correctly find python.exe with #1381.

I think #1381 only fixes the problem for find_default_python but not when calling uv --python 3.8 where 3.8 is the default python installation

It looks like python and python.bat are on your path, we don’t support those shims yet. You should add python.exe to your path e.g. by adding the sys.executable folder you showed at the end to PATH.

Or, yes, you can use the full path to the interpreter executable directly