Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior of uv pip install different from docs #7123

Closed
kdheepak opened this issue Sep 6, 2024 · 2 comments · Fixed by #7188
Closed

Behavior of uv pip install different from docs #7123

kdheepak opened this issue Sep 6, 2024 · 2 comments · Fixed by #7188
Assignees
Labels
error messages Messaging when something goes wrong

Comments

@kdheepak
Copy link
Contributor

kdheepak commented Sep 6, 2024

From the docs - https://docs.astral.sh/uv/pip/environments/#discovery-of-python-environments:

When running a command that mutates an environment such as uv pip sync or uv pip install, uv will search for a virtual environment in the following order:

  • An activated virtual environment based on the VIRTUAL_ENV environment variable.
  • An activated Conda environment based on the CONDA_PREFIX environment variable.
  • A virtual environment at .venv in the current directory, or in the nearest parent directory.

If no virtual environment is found, uv will prompt the user to create one in the current directory via uv venv.

Specifically, the docs say "if no virtual environment is found, uv will prompt the user to create one in the current directory via uv venv".

I'm not experiencing this:

image

I'm getting error: No virtual environment found.

This is either a bug or the documentation should be updated.

$ uv --version
uv 0.4.6 (84f25e8cf 2024-09-05)
@zanieb
Copy link
Member

zanieb commented Sep 6, 2024

Yes we should improve this error message.

@zanieb zanieb added the error messages Messaging when something goes wrong label Sep 6, 2024
@charliermarsh charliermarsh self-assigned this Sep 8, 2024
@charliermarsh
Copy link
Member

Gonna fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants