2

I am testing out the ipython package for Emacs 24.3.1 on Ubuntu 14.04. First, I installed both ipython and python-mode using the package manager M-x list-packages. For debugging, I simplified my init file ~/.emacs to:

(setq debug-on-error t)
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("marmalade" . "http://marmalade-repo.org/packages/")
                         ("melpa" . "http://melpa.milkbox.net/packages/")))

(package-initialize)
(require 'ipython)

First question, why is package-initialize and require 'ipython needed? I thought this would work automatically out of the box after installing from the package manager?

Second question, when I run M-x py-shell I get the following screen shot (t.py is test Python script):

enter image description here

As seen, I get an error from IPython:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'olors' is not defined
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
  • 1
    Have you looked at this potential duplicate question? http://stackoverflow.com/questions/8226493/ipython-emacs-integration – rimero Oct 03 '14 at 06:33
  • @rimero Thanks, I did not see that question. Anyway the question in the link is 3 years old, so it should be fixed by now? I tried now `(setq py-python-command-args '("--colors=linux"))` from that link, put it did not work either.. – Håkon Hægland Oct 03 '14 at 06:45
  • 3
    Not a direct answer, but the python.el support bundled with Emacs has been changed for 24.4 (to be released real-soon-now) so it supports IPython out of the box. It would be great if you could try the 24.3.94 pretest to make sure that this new support indeed works as expected. – Stefan Oct 03 '14 at 11:59

1 Answers1

1

No need for ipython.el, which causes this error.

BTW as trunk of python-mode.el is close to upcoming release, it might be worth a try.

https://launchpad.net/python-mode

bzr branch lp:python-mode

Andreas Röhler
  • 4,804
  • 14
  • 18