For convenience and given that activate
-ing an environment is crazy slow, I want to activate an environment and then start a tmux
session.
I want all new tmux
windows to also have the environment activated.
I want different tmux
sessions to be able to support different anaconda environments.
How do I go about this?
Are there any gotchas such that this isn't supported by anaconda
/ miniconda
?
What I've done to address this problem is:
.tmux.conf
, copyCONDA_DEFAULT_ENV
environment variable to session environment.bashrc
, reactivate the conda environment if one was activated: Note 1: this assumes that__conda_reactivate
is available because ofconda init
or similar. Note 2: in older versions of conda, it's_conda_reactivate
(just one leading underscore).This is faster than
conda activate <env>
and also different environments can be used before creating different tmux sessions.