Search code examples
pythonemacsipythonpython-mode

Installing IPython in emacs


My apologies if this is a repost. I couldn't find a similar one in the questions.

I am trying to set up emacs as my python IDE with IPython in it. Basically follow this http://www.jesshamrick.com/2012/09/18/emacs-as-a-python-ide/

The version of python in my emacs shell is 2.7.5 whereas the one in terminal 2.7.6. However typing ipython in to the emacs shell shows ipython is not installed, but I was able to install ipython to the terminal.

I would like to know how to install the ipython plugin to the .emacs file. When you say install, does it mean copy the files and put it there ? If yes, I have done this. However when I try to run a python program, it shows "Searching for program: No such file or directory, ipython. Thanks in advance for the help.

Screenshot of error from emacs


Solution

  • It seems that your emacs cannot find ipython. You may need to set PATH environment variable, but for now, I think this works...

    In your terminal do which ipython, and you will get your ipython executable path. Then in your .emacs file, change "ipython" in the following line to whatever the absolute path that you get.

    (setq-default py-shell-name "ipython")