uv icon indicating copy to clipboard operation
uv copied to clipboard

No interpreter found for path `C:/Users/USERNAME/miniforge3/envs/my-custom-env/python` in managed installations, system path, or `py` launcher

Open kdheepak opened this issue 1 year ago • 3 comments

I'm unable to run uv sync --python=$(which python) on Windows. I'm getting the following error:

$ conda env create -n my-custom-env python=3
$ conda activate my-custom-env
$ conda install uv
$ uv init --lib
$ uv sync --python=$(which python)
error: No interpreter found for path `C:/Users/USERNAME/miniforge3/envs/my-custom-env/python` in managed installations, system path, or `py` launcher

This works fine on MacOS by creating a symlink.

$ uv --version
uv 0.4.15

kdheepak avatar Sep 22 '24 14:09 kdheepak

Can you share verbose output with -v?

Note you can't use --python to sync a project to a different environment. That will just change the interpreter we use to create the environment. Instead, see the documentation on configuring the project environment.

zanieb avatar Sep 22 '24 16:09 zanieb

Here's the output of --verbose:

$ uv sync --python=$(which python) --verbose
DEBUG uv 0.4.15
DEBUG Found project root: `C:\Users\USERNAME\gitrepos\project-foo`
DEBUG No workspace root found, using project root
DEBUG Checking for Python interpreter at path `C:/Users/USERNAME/miniforge3/envs/my-custom-env/python`
error: No interpreter found for path `C:/Users/USERNAME/miniforge3/envs/my-custom-env/python` in managed installations, system path, or `py` launcher

Note you can't use --python to sync a project to a different environment.

Yes, I was mainly just curious and tried it (on my mac it symlinked python into .venv), and decided to report because it was different on Windows.

kdheepak avatar Sep 22 '24 17:09 kdheepak

Is this still an issue? I wonder if it's because the .exe is missing? It's weird that which would drop that?

zanieb avatar Oct 21 '24 22:10 zanieb