Tuesday 30 April 2019

Emacs and conda workaround

I'm using emacs and anaconda.

I have this in my init.el:

(setenv "WORKON_HOME" "/home/user/anaconda3/envs/")

And conda on my path:

# added by Anaconda3 installer
export PATH="/home/user/anaconda3/bin:$PATH"

but emacs can't find my conda environments, which I understand it is supposed to be able to do..

So, when I run C-c C-p to start a new session, and C-c C-c, it fails to import my packages which are installed in a conda environment, with ModuleNotFoundError.

Since I have added this to my path and it still doesn't work, I am trying to work around this, and still be able to run my conda applications from emacs.

I can open a shell in emacs with M-x shell, then source activate myenv, and run python.

I now want C-c C-c to copy into /this/ shell. How do I mark this shell buffer as a python process to send my file.py's text to on C-c C-c, rather than just a shell shell?

Update1

I've also looked at the following references:

But neither package works for me. I still get, when I try:

conda-env-list

*Conda envs*

Produces a blank buffer.

And this for pyvenv-workon:

pyvenv-workon
  Work on:  (empty)

These environments very much exist, and it makes it impossible to use emacs as a python IDE if I can't run my code.



from Emacs and conda workaround

No comments:

Post a Comment