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

uv run should not require an existing virtual environment #3556

Closed
zanieb opened this issue May 13, 2024 · 3 comments
Closed

uv run should not require an existing virtual environment #3556

zanieb opened this issue May 13, 2024 · 3 comments
Labels
preview Experimental behavior

Comments

@zanieb
Copy link
Member

zanieb commented May 13, 2024

Currently uv run fails if a virtual environment is not present

❯ uv run --with anyio -- python -c "print('hi')"
warning: `uv run` is experimental and may change without warning.
error: Failed to locate a virtualenv or Conda environment (checked: `VIRTUAL_ENV`, `CONDA_PREFIX`, and `.venv`). Run `uv venv` to create a virtualenv.

We should not require a virtual environment to exist to run commands.

You can currently bypass this with --isolated

❯ uv --isolated run --with anyio -- python -c "print('hi')"
warning: `uv run` is experimental and may change without warning.
Resolved 3 packages in 195ms
Downloaded 3 packages in 78ms
Installed 3 packages in 8ms
 + anyio==4.3.0
 + idna==3.7
 + sniffio==1.3.1
hi
@zanieb zanieb added the preview Experimental behavior label May 13, 2024
@charliermarsh
Copy link
Member

Are you sure this is true on main? It works fine for me.

@charliermarsh
Copy link
Member

I'm thinking of: #3499

@zanieb
Copy link
Member Author

zanieb commented May 13, 2024

Ah I was running the latest release, presuming you fixed this then.

@zanieb zanieb closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior
Projects
None yet
Development

No branches or pull requests

2 participants