Installation

Jorgen Schaefer edited this page Dec 2, 2017 · 12 revisions
Clone this wiki locally

Installation

Emacs Side

Elpy requires Emacs 24.

The easiest way to get Elpy is to install it via package.el. Simply add the following to your .emacs file, or just evaluate it in your *scratch* buffer for one-time use:

(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/"))

Then run M-x package-refresh-contents to load the contents of the new repository. Once this is done, you should be able to run M-x package-install RET elpy RET.

To use elpy, just add the following to your .emacs:

(package-initialize)
(elpy-enable)

If you want to use IPython (make sure it's installed), add:

(elpy-use-ipython)

If you find the (Python Elpy yas AC ElDoc Fill) mode line annoying, also add:

(elpy-clean-modeline)

Python side

For syntax checking, you need the flake8 tool:

pip install flake8

For auto-completion features you need to decide on whether you want to use 'rope' or 'jedi', and install either one:
(installation of jedi is preferred based on this issue)

pip install jedi

or if you are using Python 2.x and have reasons to prefer rope

pip install rope

If you are using Python 3 and want to use Rope, install the rope_py3k package, not rope.

pip install rope_py3k