Open alkalifly opened 4 years ago
It is because Sublime Text gets the PATH from .bashrc
already and Terminus sources the file again. But it usually doesn't cause any issues. Don't know why it changs the order of the paths.
Is there any way of checking whether the order changing is happening somewhere in Sublime vs. specifically in Terminus? And can you think of any possible ways of getting around it? I tried adding
"args": { "shell_cmd": "export PATH='/Users/alkalifly/miniconda/bin:$PATH'", }
to the key command for "terminus_open" but that just makes the Terminus shell disappear immediately after it launches.
.. But it usually doesn't cause any issues.
.. so the shell uses the system python instead of the conda python.
That looks like an issue to me.
This seems resolved by "shell_environment": false,
sublime text preference.
Mac OSX user here, I apologize if this is a more general Sublime Text issue, but when I open a bash shell with Terminus, the elements of my PATH are not in the same order as they are with Terminal.app, Xterm, etc.
My .bashrc contains:
export PATH=/Applications/MATLAB_R2019b.app/bin:$PATH
followed by the "conda initialize" code block, so when Iecho $PATH
in Terminal.app, I get/Users/alkalifly/miniconda/bin:/Users/alkalifly/miniconda/condabin:/Applications/MATLAB_R2019b.app/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
But when I
echo $PATH
in a Terminus shell, I get/Applications/MATLAB_R2019b.app/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Users/alkalifly/miniconda/bin:/Users/alkalifly/miniconda/condabin:/Applications/MATLAB_R2019b.app/bin
You may notice that
/Applications/MATLAB_R2019b.app/bin
(added in my .bashrc) appears in duplicate, which is strange, but the problem is that the conda stuff (also added in my .bashrc) appears only once and is after/usr/bin
so the shell uses the system python instead of the conda python. I still see the(base)
at the command prompt, indicating that the conda base environment is activated, butwhich python
results in/usr./bin
(which is not surprising, given the order of directories in my PATH.