EMACS, how to install it for Python purposes

What IDE should I start with?

I have asked about some different IDEs for Python and this was the short list: EMACS, jupyter, syder and anaconda.

Then, I asked my friend: what is the more convenient for a basic learner as me? EMACS.

So this is the one I have installed. The basis of how to use EMACS can be read here. The guidelines recommends the installation of Elpy so this is the next step I have done.

Elpy – Python Development

Emacs is distributed with a python-mode (python.el), but if we want to have a more sophisticated IDE you can install Elpy (Emacs Lisp Python Environment) package.

Before to install Elpy, you have to install these 2 packages:

  • Flake8: flymake-python-pyflakes.
  • Jedi.

The document I used to install it is this one.

The issue I’m finding is that the these 2 packages are legacy and they seem to not work properly. I’m sure that in reality the issue is that I’m not able to enable them in the right way or to enable python properly. I’m stuck here by the moment.

Python extensions

Some basic notes about the python files extensions:

  • .py: This is normally the input source code that you’ve written (the basis).
  • .pyc: This is the compiled bytecode. If you import a module, python will build a *.pyc file that contains the bytecode to make importing it again later easier (and faster).
  • .pyo: This is a *.pyc file that was created while optimizations (-O) was on.
  • .pyd: This is basically a windows dll file. http://docs.python.org/faq/windows.html#is-a-pyd-file-the-same-as-a-dll

EMACS basic commands I have learned today.

  • M-x list-packages: list the available packages you have in EMACS
  • M-x customize-group: enable you to customize a package (in my case: “package”. I have added Melpa packages to the list so these packages can be installed.
  • M-x package-install: to perform the installation of a package.

This video shows you how to install a package: .Emacs #3 – Installing Packages and Extensions. The series of videos are useful for new users as me.

Leave a Comment