If using mariadb install this:
apt-get install libmariadbclient-dev
If using mysql install this:
apt-get install libmysqlclient-dev
pip3 install mysql
The directory '/root/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/root/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting mysql
Downloading https://files.pythonhosted.org/packages/9a/52/8d29c58f6ae448a72fbc612955bd31accb930ca479a7ba7197f4ae4edec2/mysql-0.0.3-py3-none-any.whl
Collecting mysqlclient (from mysql)
Downloading https://files.pythonhosted.org/packages/50/5f/eac919b88b9df39bbe4a855f136d58f80d191cfea34a3dcf96bf5d8ace0a/mysqlclient-2.1.1.tar.gz (88kB)
100% |████████████████████████████████| 92kB 5.5MB/s
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
mysql_config --version
mariadb_config --version
mysql_config --libs
Traceback (most recent call last):
File "
File "/tmp/pip-install-twfzngc5/mysqlclient/setup.py", line 15, in
metadata, options = get_config()
File "/tmp/pip-install-twfzngc5/mysqlclient/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-twfzngc5/mysqlclient/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-twfzngc5/mysqlclient/
python, mysql, install, bin, sh, mysql_config, mariadb_config, versionthese, errors, dbconfig, debian, ubuntu, mariadb, apt, libmariadbclient, dev, libmysqlclient, pip, directory, cache, http, user, disabled, permissions, executing, sudo, caching, collecting, downloading, https, pythonhosted, org, packages, ae, fbc, bd, accb, ca, edec, py, whl, mysqlclient, eac, df, bbe, cfea, dcf, bf, tar, gz, kb, mb, output, egg_info, libs, traceback, quot, tmp, twfzngc, metadata, get_config, setup_posix, oserror, format, _mysql_config_path,