Activate virtualenv environment on terminal launch #19712
|
When I launch a new terminal while an environment is selected, the expected behavior is for the shell to source the activation script of the target env. What happens in my case is that the source command is shown in the terminal but has no effect. When I run the exact same command once the terminal is initialized then it works. source /home/tyassine/.virtualenvs/dev/bin/activate
tyassine@LAP-331:~/Code/ChannelCharting$ source /home/tyassine/.virtualenvs/dev/bin/activate
(dev) tyassine@LAP-331:~/Code/ChannelCharting$ First line appears right after I launch a new terminal. Subsequent lines I ran manually to show the problem. |
Replies: 2 comments 4 replies
|
How complicated is your shell activation? It looks like the terminal is ready before your shell is, and so it's sending the command before the shell is ready to accept input. |
|
My shell activation is pretty basic. The only extra things I do are initializing virtualenvwrapper and setting the |
My shell activation is pretty basic. The only extra things I do are initializing virtualenvwrapper and setting the
$DISPLAYvariable for VcXsrv. I should mention I use WSL.