-
Notifications
You must be signed in to change notification settings - Fork 233
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 shell
does not activate environment
#3055
Comments
pixi shell
does not go to next line even though command returns succesfullypixi shell
does not activate environment
Hi I have this issue on Bazzite, except the |
Here is the recording of my experience. Video expires in two days. https://streamable.com/65qs9b @ruben-arts if you have time to have a second look at it... |
Having the same issue. Other details to add is that this only affects This issue doesn't happen on my local Ubuntu 22.04 though. |
|
Hey @wolfv, thanks for the effort in #3130 . I built pixi from source after checking out from
|
I'm also having this problem and @Ehab-Ibrahim's workaround also works for me. Output of
Output of
|
I tried to reproduce your issue today and didn't succeed, yet. I tried: a very long $PS1, and a multi-line $PS1 - both worked fine. Can you share whether you are using anything special such as "starship", multi-line prompt, colorful prompt? Can you share the value of your $PS1? I'll boot into Windows and try with WSL2 if I can recreate the issue there, too. |
Hi @wolfv, Here is the video of my experience once again: https://streamable.com/amdg80 . This is using default windows terminal, default wsl, no personal configurations at all.
|
@saydemr - thanks for helping me! I am trying with a very similar configuration (Windows / WSL2). Can you tell me exactly which Ubuntu version and which pixi version you are using? I'll try to match it perfectly as I couldn't recreate it yet. I also tried a number of different pixi versions. Which one are you showing exactly in the video? (Might be something useful to log with Lastly, does The below was a completely fresh Ubuntu 22.04.5 installation on WSL2. My locale is English-US. |
PS: running with |
I don't think this is necessarily a Windows/WSL2 problem. I'm encountering this problem on a Linux server, no Windows involved. Sorry, I should've indicated that in my first comment. |
Yes, I understand. I was hoping to reproduce easily on WSL though - no success yet. |
The $PS1 on the Linux server is:
|
I'm having the same issue using WSL. Output of daniel@lab:~/Repos/pixi-test$ pixi info
System
------------
Pixi version: 0.41.4
Platform: linux-64
Virtual packages: __unix=0=0
: __linux=5.15.167.4=0
: __glibc=2.35=0
: __cuda=12.5=0
: __archspec=1=skylake
Cache dir: /home/daniel/.cache/rattler/cache
Auth storage: /home/daniel/.rattler/credentials.json
Config locations: /home/daniel/.config/pixi/config.toml
Global
------------
Bin dir: /home/daniel/.pixi/bin
Environment dir: /home/daniel/.pixi/envs
Manifest dir: /home/daniel/.pixi/manifests/pixi-global.toml
Project
------------
Name: pixi-test
Version: 0.1.0
Manifest file: /home/daniel/Repos/pixi-test/pixi.toml
Environments
------------
Environment: default
Features: default
Channels: https://artifactory.intra.somecorp.com/artifactory/conda-it-conda-forge
Dependency count: 0
Target platforms: linux-64 My PS1: @wolfv what can I else provide? |
I have made some changes in this PR: #3321. In ~15 minutes there should be some artifacts that you could try to see if that helps with this issue. I still haven't been able to recreate the issue (I also tried a |
The builds are now available at the bottom of this page: https://github.com/prefix-dev/pixi/actions/runs/13783534297?pr=3321 |
I have an update. I introduced pixi to another user in my company, and it turns out that he didn't get stuck when running In my if [[ $- = *i* ]]; then
exec ~/.pixi/bin/fish
# if [ -f ~/.bashrc ]; then
# . ~/.bashrc
# fi
fi This was my workaround to set up I was able to reproduce this on my local Ubuntu 22.04 as well. I added |
Ok, that is a helpful hint. I am not sure we have a way to workaround starting fish in the bashrc ... - but I'll take a look and at least I can recreate this easily :) |
Hi @wolfv From windows side
I am on Ubuntu WSL 24.04.2, latest LTS release
WSL system locale settings
Output of
I have downloaded the artifact from the link you just provided and unzipped it. Therefore, pixi version is not relevant.
and pixi info prints
I cannot stress enough that I do not use any other shell extensions whatsoever. I do not have fish, starship etc. and there is nothing inside |
@saydemr I don't see anything surprising. I really tried this with different ubuntu versions on WSL yesterday. Maybe you can double check once more the exact contents of your |
@wolfv now, solved. I sourced For me, the line causing a problem was a drive mount at the very end of
I still did not understand why this is a problem... Any guesses? Issue can be closed if you do not have a fix from pixi side |
Interesting. I wonder if it has to do with the redirect ( |
I figured out what is making hang on my shell (WSL) this line: I need this so I can access my company's network from WSL. |
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
Run the following command on WSL, Ubuntu 24.04.
Problem occurs with any dependencies and any dependency types, yet an example
pixi.toml
file is as follows.output of
pixi info
Other info that might be relevant:
Issue description
The output is as follows
After exiting with
Ctrl+D
,which python
points to default installed python inside/usr/bin
The terminal does not hang as opposed to what we initially thought (thanks to maximmaxim345 see here). Even though terminal does not activate the environment and does not show the next line
(go-to-next-line) username@sam:~/go-to-next-line$
what is typed in the terminal is executed by the shell.For example, current state of the directory is as follows.
After using
pixi shell
typingecho does not go to next line >> a.out
and hitting return actually creates a file and appends the contents. This indicates that command does not hang but somehow environment is not activated properly after the command is executed.here
echo does not go to next line >> a.out
is executed followed byCtrl+D
Python path shows the one in
usr/bin/python
from which we understand that the environment is not activated properly.Expected behavior
After executing
pixi shell -v
expected behavior should be as follows.where environment name is shown before the username and the present working directory, followed by
$
indicating the user that environment is ready and terminal can take in the next command.Further,
which python
should returnThe text was updated successfully, but these errors were encountered: