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

feature-specific deps installed inside pixi shell only available after restarting shell #1271

Closed
2 tasks done
moritzwilksch opened this issue Apr 25, 2024 · 3 comments
Closed
2 tasks done
Labels
🐞 bug Something isn't working

Comments

@moritzwilksch
Copy link

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

(running this in a fish shell)

➜  example git:(main) ✗ pixi init && pixi add python
➜  example git:(main) ✗ pixi add -f feat1 polars
➜  example git:(main) ✗ nvim pixi.toml  # add env1 = ["feat1"]
➜  example git:(main) ✗ pixi shell -e env1
(example:env1) ➜  example git:(main) ✗ python
Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:35:20) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import polars  # works
(example:env1) ➜  example git:(main) ✗ pixi add -f feat1 pandas  # still in the pixi shell
✔ Added pandas
(example:env1) ➜  example git:(main) ✗ python
Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:35:20) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pandas'
>>>
(example:env1) ➜  example git:(main) ✗  # CTRL+D
➜  example git:(main) ✗ pixi shell -e env1
(example:env1) ➜  example git:(main) ✗ python
Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:35:20) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas  # works

Issue description

When adding dependencies to a specific feature from inside a pixi shell running in an environment using that feature, the installed dependency is not available. One has to quit the pixi shell and restart it for it to be usable.

This does not happen when adding deps to the default environment from inside the default shell.

Expected behavior

Just like with the default environment, dependencies should be available immediately after a pixi add without having to restart the pixi shell.

@moritzwilksch moritzwilksch added the 🐞 bug Something isn't working label Apr 25, 2024
@niemiaszek
Copy link

Ah, I guess it is what got me confused lately. Same for me

@baszalmstra
Copy link
Contributor

I think this is a duplicate of #1018

@ruben-arts ruben-arts closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@ruben-arts
Copy link
Contributor

Closed in favor of #1018

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

No branches or pull requests

4 participants