I have recently started to investigate a project using Python as its
main language. Since I have become found of both
company-mode (especially using
irony-mode), I wanted to enrich my
configuration from my Emacs’ prolusion to take advandantage of
on-the-fly checking and auto-completion. Here is how to do so in a
First of all, for the embedded python interpreter to behave as
excpected, you need to have set up some environment variables
considering locale in either your
whether your or working on Linux on MacOS.
1 2 3
Using MacOS, you’ll have to import them in your Emacs environment
using the excellent
1 2 3 4
Now, we need to respectively add the requirements and configure them as you wish.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
This will give you completion for system-wide python packages. Note
that I have not yet tested it with third-party once, such as those
that come with e.g.
conda virtual environments.
Now for the on-the-fly checking.
Find out the whole Emacs’s configuration here: https://github.com/jwintz/prolusion.
Note that the first step to get python’s jedi server running is to run:
And that this requires
virtualenv to be installed and referred by
I installed it using my system wide python install’s
install python), which implies to be careful when using
virtual environments that come together with their own python
installation by using
source activate which alters your
environment variable. Not to mention that this overrides MacOS’s
default python installation.