Install jedi-mode in emacs

Today, I have went through rather complicated process of installing jedi-mode in emacs. I post here what worked for me. First of all, make sure you run recent emacs (24+) and then follow:

# install python-virtualenv
sudo apt-get install python-virtualenv 

# run emacs, enable MELPA repository, refresh packages and install jedi-mode
emacs 
M-: (add-to-list 'package-archives'("melpa" . "http://melpa.org/packages/") t)
M-x package-refresh-contents [RET]
M-x package-install [RET] jedi [RET]

# install python server
M-x jedi:install-server

# add below lines to ~/.emacs.d/init.el & restart emacs
;; Standard Jedi.el setting
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)

Leave a Reply

Your email address will not be published. Required fields are marked *