Skip to content
Advertisement

Python MariaDB pip install failed, missing mariadb_config

I am using Linux Ubuntu 18.04 and python 3. I am trying to build a connection between a maria-db and my python scripts. Therefore I have to install the mariadb package.
I have already installed:

But when i try:

I get following error:

Can anybody help me ?

Edit:

I have now been able to connect to the server but not with te mariadb package. (https://linuxhint.com/connect_mariadb_pymysql/)

Advertisement

Answer

To install mariadb python module, you have to install a recent version of MariaDB Connector/C, minimum required version is 3.1.5, afaik Ubuntu 18.04 has 3.0.3.

An actual version of Connector/C for bionic is available on the MariaDB Connector/C Download Page.

If you want to install it in a special directory, make sure that the PATH and LD_LIBRARY_PATH point to bin and lib directories.

I also recommend to use a recent version of MariaDB Server, especially the very fast executemany() method will be much slower on MariaDB Server < 10.2.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement