7

Ok, so I am in my anaconda environment and I ran which python. I get

/home/comp/anaconda3/envs/env1/bin/python

Now if I start tmux, then run source activate env1, then which python, I get

/home/comp/anaconda3/bin/python

even though I do have my environment activated. How can I make anaconda see the same path inside tmux ?

12

The solution seems to be to deactivate the conda environment, then start tmux, then reactivate the environment inside tmux.

  • 2
    Weird solution but works ... – LYu Oct 16 '18 at 17:18
  • That's weird indeed. – ZirconCode Nov 14 '18 at 21:23
  • I'm upvoting because this is the solution that worked for me, however it is really a far from ideal solution – johnchase Feb 6 at 23:13
1

Running:

conda activate env1

Instead of:

source activate env1

When inside tmux worked for me.

0
nano ~/.bash_profile

Add the following lines:

source deactivate env1
source activate env1

worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.