0

I am trying enable python dev environment in Doom Emacs (to which I am a newbie); I installed elpy; and tried to launch shell to which it says "python not found but can be installed from Microsoft...".

Then I added this to my config.el:

(setq python-shell-interpreter "C:\\users\\username\\AppData\\Local\\Programs\\Python\\Python38-32")

and tried again; displays this in mini-buffer:

Python shell interpreter 'C:\users\username\AppData\Local\Programs\Python\Python38-32' cannot be found. Please set 'python-shell-interpreter' to a valid python binary.

But that's where my python binaries reside. I have added the same path to my "exec-path"; still can't run python in eshell.

sawan
  • 67
  • 3
  • 2
    I think `python-shell-interpreter` must be the name of the binary itself, not just the directory. So you probably want `(setq python-shell-interpreter "C:\\users\\username\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe")` – 0x5453 Jun 10 '20 at 14:14
  • @0x5453 Nope, still the same problem. – sawan Jun 10 '20 at 14:32
  • Is it only eshell that has the problem? Can you run python from a comint shell? from the command line? what is the value of your %PATH%? – NickD Jun 10 '20 at 15:21
  • @NickD not in emacs(comint or eshell). However, I am able to run python on command line. ```%PATH% is "C:\Users\username\AppData\Local\Programs\Python\Python38-32\" and "C:\Users\username\AppData\Local\Programs\Python\Python38-32\Scripts\"``` – sawan Jun 10 '20 at 15:37
  • Presumably, those PATH entries aren't in the PATH when examined from a shell within emacs? If emacs has the correct PATH, `(executable-find "python")` (or whatever the binary should be on Windows) shouldn't return `nil` – Rorschach Jun 10 '20 at 18:36

0 Answers0