0

I have anaconda installed on Windows (Windows 7), and it is working well in Jupyter. But of course I'd prefer to work in emacs.

I have elpy installed in emacs, and it successfully sends commands to the correct python. However, the python environment is not set up correctly, and I am unable to import numpy.

What could cause this issue? Below is the configuration I currently have in my .emacs:

(use-package elpy
  :config
  (setq python-shell-virtualenv-path
        "C:/Users/<username>/AppData/Local/Continuum/anaconda3/envs"
        python-shell-interpreter 
        "C:/Users/<username>/AppData/Local/Continuum/anaconda3/python.exe"
        elpy-rpc-python-command 
        "C:/Users/<username>/AppData/Local/Continuum/anaconda3/python.exe")
  (setenv "PATH" (concat "C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3;\
C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3\\Library\\mingw-w64\\bin;\
C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3\\Scripts;\
C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3\\condabin;"
                         (getenv "PATH")))
  (setenv "PYTHONPATH" "C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3;\
C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3\\Library\\mingw-w64\\bin;\
C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3\\Scripts;\
C:\\Users\\<username>\\AppData\\Local\\Continuum\\anaconda3\\condabin;"))

Your Answer

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

Browse other questions tagged or ask your own question.