mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-07-27 13:01:19 +00:00
180 lines
7.7 KiB
HTML
180 lines
7.7 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>Installation — MariaDB Connector/Python 1.0.0 documentation</title>
|
||
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
|
||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||
<script src="_static/jquery.js"></script>
|
||
<script src="_static/underscore.js"></script>
|
||
<script src="_static/doctools.js"></script>
|
||
<script src="_static/language_data.js"></script>
|
||
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="Basic usage" href="usage.html" />
|
||
<link rel="prev" title="MariaDB Connector/Python" href="index.html" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="usage.html" title="Basic usage"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="index.html" title="MariaDB Connector/Python"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">MariaDB Connector/Python 1.0.0 documentation</a> »</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="installation">
|
||
<span id="id1"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
|
||
<div class="section" id="prerequisites">
|
||
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2>
|
||
<ul class="simple">
|
||
<li><p>Python 3 (minimum supported version is 3.6)</p></li>
|
||
<li><p>MariaDB Server 10.x or MySQL Server</p></li>
|
||
<li><p>MariaDB Connector/C 3.1.5 or newer</p></li>
|
||
</ul>
|
||
<div class="section" id="build-prerequisites">
|
||
<h3>Build prerequisites<a class="headerlink" href="#build-prerequisites" title="Permalink to this headline">¶</a></h3>
|
||
<p>The following build prerequisites are required to install or build MariaDB Connector/Python.
|
||
For Windows operating platforms the pypi.org download page provides binary versions.</p>
|
||
<ul class="simple">
|
||
<li><p>C compiler</p></li>
|
||
<li><p>Python development files (Usually they are installed with package <strong>python-dev</strong>). The minimum supported version of Python is 3.6</p></li>
|
||
<li><p>MariaDB Connector/C libraries and header files (Either from MariaDB server package or
|
||
from MariaDB Connector/C package).</p></li>
|
||
<li><p>For Posix systems: TLS libraries, e.g. GnuTLS or OpenSSL (default)</p></li>
|
||
</ul>
|
||
<p>On Posix systems make sure that the path environment variable contains the directory which
|
||
contains the mariadb_config utility.</p>
|
||
<p>Once everything is in place, run</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> pip3 install mariadb
|
||
</pre></div>
|
||
</div>
|
||
<p>or if you downloaded the source package</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> python setup.py build
|
||
<span class="gp">$</span> python setup.py install
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="binary-installation">
|
||
<h2>Binary installation<a class="headerlink" href="#binary-installation" title="Permalink to this headline">¶</a></h2>
|
||
<p>MariaDB Connector/Python is also available from PyPi as wheel packages for Windows.
|
||
These binary packages are not intended for production use, since there might be several limitations
|
||
and bottlenecks, e.g.:</p>
|
||
<ul class="simple">
|
||
<li><p>Dynamic MariaDB plugins (e.g. authentication plugins) are not part of the package and must
|
||
be installed separetly by installing MariaDB Connector/C or MariaDB Server package.</p></li>
|
||
</ul>
|
||
<p>Make sure you have an up to date version of pip and install it with</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> pip3 install mariadb
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="test-suite">
|
||
<h2>Test suite<a class="headerlink" href="#test-suite" title="Permalink to this headline">¶</a></h2>
|
||
<p>If you have installed the sources, after successful build you can run the test suite
|
||
from the source directory.</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> python -m unittest discover -v
|
||
</pre></div>
|
||
</div>
|
||
<p>You can configure the connection parameters by using the following environment variables</p>
|
||
<ul class="simple">
|
||
<li><p>TEST_USER (default root)</p></li>
|
||
<li><p>TEST_PASSWORD</p></li>
|
||
<li><p>TEST_DATABASE (default ‘testp’)</p></li>
|
||
<li><p>TEST_HOST (default ‘localhost’)</p></li>
|
||
<li><p>TEST_PORT (default 3306)</p></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<h3><a href="index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Installation</a><ul>
|
||
<li><a class="reference internal" href="#prerequisites">Prerequisites</a><ul>
|
||
<li><a class="reference internal" href="#build-prerequisites">Build prerequisites</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#binary-installation">Binary installation</a></li>
|
||
<li><a class="reference internal" href="#test-suite">Test suite</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="index.html"
|
||
title="previous chapter">MariaDB Connector/Python</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="usage.html"
|
||
title="next chapter">Basic usage</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="_sources/install.rst.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="usage.html" title="Basic usage"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="index.html" title="MariaDB Connector/Python"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">MariaDB Connector/Python 1.0.0 documentation</a> »</li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2019,2020 MariaDB Corporation and Georg Richter.
|
||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.3.
|
||
</div>
|
||
</body>
|
||
</html> |