Installation
Requirements
- Python 3.6 – 3.9 (see the note below about newer versions)
PyMySQL— installed automatically as a dependency- A running MySQL or MariaDB server
EasyMySQL 0.1.9.x uses collections.Iterable, which was removed from the
standard library in Python 3.10. On Python 3.10+ every call that takes a dictionary
condition raises AttributeError, and update() fails on any
call at all. See Limitations for exactly what still
works and how to work around it.
Install via pip
pip install easymysql If you have both Python 2 and Python 3 installed, use:
pip3 install easymysql
The driver underneath is PyMySQL,
a pure-Python MySQL client. It is declared in the package's install_requires, so
pip pulls it in for you — there is nothing to compile and no MySQL C client to install first.
Verify the installation
python -c "from easymysql.mysql import mysql; print('EasyMySQL installed OK')" To check which version you have installed:
pip show easymysql version() method lags behind
The instance method db.version() returns the hard-coded string
"0.1.9.2" even on the 0.1.9.3 release — it was not bumped along with the
package. Trust pip show easymysql instead.