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 removing packages installed by uv not part of pixi.toml #998

Closed
tadejsv opened this issue Mar 16, 2024 · 4 comments · Fixed by #1043
Closed

Pixi removing packages installed by uv not part of pixi.toml #998

tadejsv opened this issue Mar 16, 2024 · 4 comments · Fixed by #1043
Assignees
Labels
🐞 bug Something isn't working 🐍 pypi Issue related to PyPI dependencies

Comments

@tadejsv
Copy link

tadejsv commented Mar 16, 2024

I am installing a package from github (git+ssh://) using uv, as pixi does not support this yet. However, whenever I run any pixi command (even just pixi shell), this package gets uninstalled.

Is this really the desired behavior? Why not just issue a warning if non pixi-managed package is found? Or at least give an option to disable this behavior?

For now I am simply switching to installing with pip, which works, but is inferior to installing with uv

@ruben-arts
Copy link
Contributor

He @tadejsv, this is an good find.
This is most likely because we also use uv and "our" uv is getting the instruction to uninstall packages that are not needed anymore (based on requirements). As uv finds both pixi's and your uv packages it acts on them as equal.

@tdejager I know we're going to support all this behavior but would it be possible to make sure we only uninstall pixi installed packages? By making the INSTALLER uv-pixi or something like that.

@ruben-arts ruben-arts added 🐞 bug Something isn't working 🐍 pypi Issue related to PyPI dependencies labels Mar 18, 2024
@wolfv
Copy link
Member

wolfv commented Mar 20, 2024

I made a quick PR to uv here: astral-sh/uv#2561

@tdejager
Copy link
Contributor

tdejager commented Mar 20, 2024 via email

@tdejager
Copy link
Contributor

Uv has merged this so we should update and add the installer in the relevant places :)

tdejager added a commit that referenced this issue May 7, 2024
Check the INSTALLER when removing packages either through changing of
dependencies or python version.

Fixes: #998

We now have the following behavior:
* If the installer is not `uv-pixi` and not managed by pixi we do not
touch the package.
* If the installer is not `uv-pixi` but is managed by pixi we
re-install.

Also, In the case where we switch python interpreters, which requires a
new `site-packages` folder:

* We leave the packages alone that do not have our installer

Co-authored-by: Ruben Arts <ruben.arts@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🐍 pypi Issue related to PyPI dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants