0

I'm using a nightly build of Emacs.app 24 from Emacs For OS X on OS X 10.7. After loading in my foo.py script everything works fine, except when I click "Start interpreter" from the menu bar Emacs starts the default 2.7 interpreter and fails to run my scripts written in Python 3.2. Is there any way to customize it, so that it starts the 3.2 interpreter?

I've tried (setq py-python-command "python3") in my .emacs, but it still starts the default 2.7.

2
  • Have you tried using a fully qualified path to your python interpreter?
    – OldWolf
    Oct 15, 2011 at 2:45
  • yes; doesn't help. I can do M-x shell then python3.2, but evaluating scripts in python-mode always brings up the 2.7 interpreter.
    – idclark
    Oct 15, 2011 at 4:02

3 Answers 3

2

M-x python3

should do it.

if not, please get latest source:

https://launchpad.net/python-mode/+download

if still not working, please file a bug report at

https://bugs.launchpad.net/python-mode

0

You may want to look at the posts here on Stack Overflow It looks like someone had a similar problem (though they wanted to be able to switch between interpreters.)

0

You can customize the variable

(setq python-shell-interpreter "python3")

C-h v python-shell-interpreter says

Documentation: Default Python interpreter for shell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .