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

pixi remove python doesn't remove uv dependencies #1306

Open
2 tasks done
wolfv opened this issue Apr 30, 2024 · 4 comments
Open
2 tasks done

pixi remove python doesn't remove uv dependencies #1306

wolfv opened this issue Apr 30, 2024 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers pypi Issue related to PyPI dependencies

Comments

@wolfv
Copy link
Member

wolfv commented Apr 30, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

pixi init bla
cd bla
pixi add python
pixi add --pypi flask
pixi remove python

Issue description

We have a crash because pixi first removes Python, and then still tries to create a uv context (which needs a Python interpreter).

I am not sure what we should do:

  • Disallow removing python when pypi-dependencies are there
  • Remove all pypi-dependencies when python gets removed (might destroy some work, we could add a yes/no prompt)
  • Just keep the uv stuff as is?

I think right now I prefer option 1, actually.

Expected behavior

Unsure, but don't crash!

@wolfv wolfv added the bug Something isn't working label Apr 30, 2024
@ruben-arts
Copy link
Contributor

I hate special cases for python but this does make sense to me, I think it makes sense to fix this with the prompt e.g.:

> pixi remove python
× You can't remove python if you have `pypi-dependencies`.

Do you want me to also remove all `pypi-dependencies`?
> yes
- no

But to fix it quickly disallowing it for now is a good first step.

@olivier-lacroix
Copy link
Contributor

I feel like removing all pypi-dependencies to keep it consistent and not special-case python would also be acceptable. what work could it destroy @wolfv ?

@tdejager
Copy link
Contributor

tdejager commented May 6, 2024

I agree with @olivier-lacroix here :) but would be good to hear if it actually destroys something.

@ruben-arts ruben-arts added the pypi Issue related to PyPI dependencies label May 6, 2024
@ruben-arts
Copy link
Contributor

I would also be fine with not having a prompt, as it can always be added if it is not comfortable enough.

> pixi remove python
x Removing python also removes all [pypi-dependencies] from your environment.
 |
 -> Removed flask, click, tensorflow, xxx

@ruben-arts ruben-arts added the good first issue Good for newcomers label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers pypi Issue related to PyPI dependencies
Projects
None yet
Development

No branches or pull requests

4 participants