Emacs unable to locate python

1.2k views Asked by At

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.

1

There are 1 answers

0
paulie4 On

This happened to me when I uninstalled the Python that I had originally used for the elpy "rpc" venv, so to fix it, I had to recreate the virual environment, like this:

M-x elpy-rpc-reinstall-virtualenv