1

I've got python 3.6 in this directory:

D:\Python36

How can I set in .emacs path to python 3.6 interpreter?

  • 2
    Set that path for what? A guess is that you want to be able to invoke the external Python interpreter from Emacs. If so, it sounds like you just need to ensure that it is reachable from your Path environment variable. That's not really an Emacs question. It seems you are on MS Windows. Go to Control Panel > System > Advanced System Settings > Environment Variables, and update variable Path (or add the var if not there). – Drew Jul 1 '17 at 18:38
  • 2
    Please do not post the same question to StackOverflow and SE.emacs. Pick one or the other. Please delete one of the posts. Thx. – Drew Jul 1 '17 at 18:40
  • Thx for answer. I want to use Python 3.6 interpreter, something like this: (setq py-python-command "/usr/local/bin/python2.3") – jestembotem Jul 1 '17 at 18:43
1
(setq exec-path (append exec-path '("d:/Python36/")))
1

python-shell-interpreter is the variable you are looking for. You can set it using

(setq python-shell-interpreter "D:\Python36")

Add this to your .emacs and reload python process.

  • Thanks for answer, but it gives me error: Specified program for new process is a directory. I'm using elpy. – jestembotem Jul 2 '17 at 16:02
  • You should set path to executable like D:\Python36\python. – ChillarAnand Jul 2 '17 at 16:04
  • Now I've got this error :spawning child process invalid argument – jestembotem Jul 2 '17 at 16:11

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.