Ubuntu

TLDR: Python Dev Dependencies on Ubuntu

Published on

TLDR: Python Dev Dependencies on Ubuntu

Some libraries arenโ€™t 100% packaged Python code, some of them are bindings to external libraries. They offer a Python interface so you can call them inside your code. On these cases, we need to install them previously at the system so the python package can work.

When that happens, we get this kind of error:

ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3

To solve errors like that, you need to install the external library, and the system configures everything to you. However, if you work with multiple Python versions managed by pyenv, you have to rebuild all python versions every time that you remember to install a new dependency.