1

My emacs version is 24.5, using in built python. I have written these lines in my .emacs for it:

(require 'python)
(setq python-shell-interpreter "C:/Python34")

The problem is none of the commands (when I am trying to run test.py) are working. I have tried several commands named like

M-x python-shell-*

and they all return

"wrong type argument:arrayp, nil".

What I am doing wrong? What am I supposed to do? What should be ideal configuration (.emacs)?

Further info:

  • Python 3.4 installed at C:/
  • Emacs at C:/Program Files/
  • $HOME is C:/user/akk/appdata/roaming/
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
Arun Kumar Khattri
  • 1,519
  • 15
  • 25

2 Answers2

3

That variable is for the Python interpreter, not the Python directory.

I don't have a Windows machine to test on, but if you update your configuration to point to the actual binary (possibly C:/Python34/python.exe?) you should find that it works.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
0

According to the mode documentation in the top of python.el, you can set this on windows like (change Python27 to Python34 for your use case:

(setq python-shell-interpreter "C:\\Python27\\python.exe")
tanzoniteblack
  • 664
  • 4
  • 5