Open louisdecharson opened 1 year ago
@louisdecharson can you confirm if you're using the same version of conda.el
in both versions of Emacs? And which shell are you using (eshell, vterm, etc)?
Hi @necaris, I am using the same version of conda.el and I am using shell
, the inferior shell with zsh
and oh-my-zsh
(the issue is the same with term
and eshell
).
Hi @necaris, I've been experimenting a bit around this and I've observed the following:
M-x conda-activate-env
, then conda stops working all shells (eshell, term, shell), meaning the current env is not passed to the shell at init and doing manually conda activate myenv
does not work either anymore. conda.el
, the above works, i.e. doing manually conda activate myenv
works on eshell, term, shelleval $__conda_setup
which is ran during ~/.zshrc
is not adding /path/to/anaconda3/condabin
to the $PATH
and the default Python version is then used. The correct behaviour is observed when I've not yet used conda.el
See also the screenshots below.
My current understanding is that conda.el
is adding the conda env path to the $PATH which then results in $__conda_setup
not working anymore, i.e. not adding /path/to/anaconda3/condabin
to the $PATH when ~/.zshrc
is ran.
I've managed to make it work for shell by changing in conda.el
(function conda--shell-strip-env
)
(if (or buffer-exists-already (not conda-env-current-path))
by
(if (not conda-env-current-path)
BEFORE ACTIVATING ENV WITH conda-env-activate
the path to the conda env /Users/louis_de_charsonville/opt/anaconda3/envs/py39/bin
is correctly added
AFTER ACTIVATING ENV WITH conda-env-activate
the path to the conda env is not added. Note also that /Users/louis_de_charsonville/opt/anaconda3/condabin
is not the first item of $PATH
either, revealing that $__conda_setup
has not worked.
Let me know what I can try to debug it further or if you have any idea what's happenning
I've upgraded to Emacs 29.0.60 and the conda prefix on the shell prompt is not there anymore. Using
conda-env-activate
does activate the correct python environment (see screenshot) but the prefix is not added to the prompt. Activating manually within the shell the conda environment does add the prefix so it's probably a command missing fromconda.el
.