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

Add option to auto-activate uv #1626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

leiserfg
Copy link

@leiserfg leiserfg commented Dec 5, 2024

No description provided.

@domenkozar
Copy link
Member

Shouldn't that be on by default?

@leiserfg
Copy link
Author

leiserfg commented Dec 5, 2024

I just mimicked the options of poetry, uv environment does not need to be active, one can always use it via uv run python something is just not very ergonomic.

@leiserfg
Copy link
Author

leiserfg commented Dec 5, 2024

Now I'm double-checking the code, and maybe the problem happens because the task to sync uv, happens before the one for activating venv? that would explain why uv is not using the correct python (it is lacking the libraries defined in libraries).

@domenkozar
Copy link
Member

Can you provide a way to reproduce the issue?

@wgordon17
Copy link

FWIW, I get around this with using venv to create the virtual environment, and then uv just reuses that environment

  languages.python = {
    enable = true;
    package = pkgs.python312Full;
    venv.enable = true;
    uv = {
      enable = true;
      sync.enable = true;
    };
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants