5

I installed emacs under conda with conda install -c conda-forge emacs

However when calling emacs from the command line, I still get the default old emacs.

I tried:

  1. log-out log-in into my ssh session, but it didn't work.
  2. calling it explicitly: <my home dir>/anaconda2/pkgs/emacs-25.2-0/bin/emacs. But it result with an error: <my home dir>//anaconda2/pkgs/emacs-25.2-0/bin/emacs: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or director

Note: When I execute python, I see that it runs the anaconda-version of python.

Any idea on how can I execute the emacs installed under conda?

1

I just tried conda run emacs and it seems to work.

| improve this answer | |
0
  1. locate where on disk the conda installer has put emacs. It can be done by activating your conda environment and running which emacs should give you full path. Note down the path
  2. launch your emacs with the /full/path/to/emacs you got from step 1. If you are unable to launch emacs, you are in trouble, uninstall and reinstall
  3. The key is to add it to the PATH variable. I recommend this
mkdir $HOME/bin       # make a bin directory if not already have one
# assuming `which emacs` has full path to conda installed emacs
ln -s `which emacs` $HOME/bin/emacs  # create a symlink, 
export PATH=$HOME/bin:$PATH     # priority to emacs in $HOME/bin
# add the above line to the bottom of your ~/.bashrc file (assumption: bash is your shell)

The advantage of doing this way is, usually we switch between conda environments, we don't have to install emacs in all of them, we just have it installed in one of the conda env, then modify $PATH to make it accessible anytime anywhere

| improve this answer | |

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.