Skip to content

uv doesn't detect pyenv-virtualenv shim environments #2109

@jarshwah

Description

@jarshwah

uv doesn't seem able to detect the virtual-environment created by pyenv-virtualenv.

uv version and repro:

$ pyenv virtualenv 3.10.2 myenv
$ pyenv local myenv
$ which python
/Users/josh/.pyenv/shims/python

$ uv pip install pip==22.0.3
error: Failed to locate a virtualenv or Conda environment (checked: `VIRTUAL_ENV`, `CONDA_PREFIX`, and `.venv`). Run `uv venv` to create a virtualenv.

$ uv --version
uv 0.1.13 (9ce5170e6 2024-02-29)

$ python --version
Python 3.10.12

But it does detect the virtualenv when activating the shell:

$ pyenv activate kraken-uv
$ uv pip install pip==22.0.3
Resolved 1 package in 312ms
Downloaded 1 package in 168ms
Installed 1 package in 8ms
 - pip==23.0.1
 + pip==22.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions