The current MariaDB Connector/Python implementation supports
Python versions from 3.7 to 3.11
MariaDB server versions from version 10.3 or MySQL server versions from version 5.7.
MariaDB client library (MariaDB Connector/C) from version 3.3.1.
To install MariaDB Connector/Python on Microsoft Windows, you first have to install a recent version of MariaDB Connector/C. MSI installer for both 32-bit and 64-bit operating systems are available from .
After installation of MariaDB Connector/C download and install MariaDB Connector/Python with the following command:
On success, you should see a message at the end âSuccessfully installed mariadb-x.y.zâ, where x.y.z is the recent version of MariaDB Connector/Python.
The following build prerequisites are required to install or build MariaDB Connector/Python from source code, github or from pypi.org.
To install MariaDB Connector/Python from sources you will need:
C compiler
Python development files (Usually they are installed with package python3-dev). The minimum supported version of Python is 3.7.
MariaDB Connector/C libraries and header files (Either from MariaDB server package or from MariaDB Connector/C package). Minimum required version for MariaDB Connector/Python < 1.1.0 is 3.1.5, for later versions 3.3.1. If your distribution doesnât provide a recent version of MariaDB Connector/C you can either download binary packages from or build the package from source.
On Posix systems make sure that the path environment variable contains the directory which contains the mariadb_config utility.
Once everything is in place, run
or if you downloaded the source package
For troubleshooting please also check the chapter from the FAQ page.
If you have installed the sources, after successful build you can run the test suite from the source directory.
You can configure the connection parameters by using the following environment variables
TEST_DB_USER (default root)
TEST_DB_PASSWORD
TEST_DB_DATABASE (default âtestpâ)
TEST_DB_HOST (default âlocalhostâ)
For Posix systems: TLS libraries, e.g. GnuTLS or OpenSSL (default)
Since MariaDB Connector/Python 1.1.5: Pythonâs âpackagingâ module.
pip3 install mariadbCollecting mariadb
Downloading mariadb-1.1.5-cp310-cp310-win_amd64.whl (190 kB)
---------------------------------------- 190.9/190.9 kB 2.9 MB/s eta 0:00:00
Installing collected packages: mariadb
Successfully installed mariadb-1.1.5pip3 install mariadbcd source_package_dir
python3 -m pip install .cd testing
python3 -m unittest discover -v