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 0.8 doesn't work with editable installations #507

Closed
2 tasks done
Hofer-Julian opened this issue Nov 28, 2023 · 3 comments · Fixed by #509
Closed
2 tasks done

Pixi 0.8 doesn't work with editable installations #507

Hofer-Julian opened this issue Nov 28, 2023 · 3 comments · Fixed by #509
Labels
🐞 bug Something isn't working

Comments

@Hofer-Julian
Copy link
Contributor

Hofer-Julian commented Nov 28, 2023

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

When using pixi, I typically add an editable installation of my current Python package.
This looks something like this:

[project]
name = "pixi-0.8"
version = "0.1.0"

channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-arm64", "osx-64"]

[tasks]
install = "pip install --editable python"
import = "python -c 'import test_package'"

[dependencies]
python = "3.12.0.*"
pip = "23.3.1.*"

Starting from pixi 0.8, running pixi run install and then pixi run import gives this:

✨ Pixi task: python -c 'import test_package'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'test_package'

You can find the complete example here: https://github.com/Hofer-Julian/pixi-0.8

According to our CI, it should happen on Windows, macOS and Linux.

Issue description

While pixi didn't support installation via pip, it was possible to install packages with pixi tasks.
Editable installations are broken since 0.8.
It seems like "normal", non-editable installations still work as expected.

Expected behavior

Ideally editable install would be directly supported by pixi. Alternatively, it would be great if one can at least install packages via pixi tasks.

@Hofer-Julian Hofer-Julian added the 🐞 bug Something isn't working label Nov 28, 2023
@Hofer-Julian Hofer-Julian changed the title Pixi 0.8 doesn't work with editable Pixi 0.8 doesn't work with editable installations Nov 28, 2023
@ruben-arts
Copy link
Contributor

Thanks for the example and letting us know, we're on it!

@ruben-arts
Copy link
Contributor

We think the issue is that we "uninstall" every package that our lock file doesn't specify as needed. This might be an easy fix. @baszalmstra is on it!

ruben-arts added a commit that referenced this issue Nov 28, 2023
Fix #507 

Pixi simply removed all redundant python packages. Only packages without
an INSTALLER where left alone. I changed this behavior to only remove
python packages installed by pixi itself.

Co-authored-by: Ruben Arts <ruben.arts@hotmail.com>
@Hofer-Julian
Copy link
Contributor Author

Wow, that was fast. Thanks for taking care of this @baszalmstra!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants