inside shell when
which conda
I get
/anaconda3/bin/conda
while inside tmux I get
/anaconda3/condabin/conda
Anyone knows the difference or something wrong with my config?
inside shell when
which conda
I get
/anaconda3/bin/conda
while inside tmux I get
/anaconda3/condabin/conda
Anyone knows the difference or something wrong with my config?
Finally I found an answer here that worked for me. Basically as @shouya said there, this problem is because tmux's run-shell
command runs a shell which doesn't read from user configs, thus tmux installed in /usr/local/bin will not be found. And best solution is to insert the following line:
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
before the first run-shell/run
command in your ~/.tmux.conf
file, and leave everything else untouched.
Then reload ~/.tmux.conf
file by
tmux source-file ~/.tmux.conf
Just to address what the primary question: Conda sets up condabin
as a directory to always keep on PATH primarily so that the conda
command can be available when base is not activated.
When you have base activated, running which conda
will find bin/conda
first on PATH; any other time condabin/conda
will be found.
The issue in OP indicates the tmux
session is not activating the base environment.