Answer the question
In order to leave comments, you need to log in
How to install mysqlclient for MySQL 8.0.19 and Python 3.8.2 under Debian 10?
The MySQL connector for Python 3.8 is not installed. I do the following:
In Debian 10 (kernel 4.19.98-1) I added a turnip:
deb http://ftp.de.debian.org/debian testing main
Then I downloaded the MySQL package manager, configured it for MySQL 8.0.19, etc.:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
sudo apt-get update --fix-missing
sudo apt-get install mysql-server
MySQL got up and everything that needs to be configured in it (including the configuration file). Next, I install Python 3.8 and so on:sudo apt-get install python3.8 python3.8-dev python3-pip python3-venv
Everything is up and everything works ... I create an environment:python3.8 -m venv env
source env/bin/activate
python -V
pip -V
All OK. I successfully rolled up the necessary packages, but mysqlclient is not installed: It gives the pip3 install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.4.6.tar.gz (85 kB)
ERROR: Command errored out with exit status 1:
command: /home/e-serg/favicon_prj/env/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ia8oy4f5/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ia8oy4f5/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-ia8oy4f5/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-ia8oy4f5/mysqlclient/
Complete output (12 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ia8oy4f5/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "/tmp/pip-install-ia8oy4f5/mysqlclient/setup_posix.py", line 61, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-ia8oy4f5/mysqlclient/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question