Reputation: 5793
I'm running python 3.6.8 on a Ubuntu 18.04 VPS and trying to install a Django project with mysqlclient==1.3.12.
When I run pip install -r requirements.txt
(in the virtual environment), I'm getting this error
ERROR: Command errored out with exit status 1:
command: /var/www/authenticjobs/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uzc9j1dl/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uzc9j1dl/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 pip-egg-info
cwd: /tmp/pip-install-uzc9j1dl/mysqlclient/
Complete output (10 lines):
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uzc9j1dl/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-install-uzc9j1dl/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-install-uzc9j1dl/mysqlclient/setup_posix.py", line 26, 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.
I know MySQL is install because when I run systemctl status mysql.service
, I get
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-09-11 10:25:22 UTC; 4min 3s ago
Main PID: 9092 (mysqld)
Tasks: 28 (limit: 4915)
CGroup: /system.slice/mysql.service
└─9092 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
What am I missing?
Upvotes: 0
Views: 609
Reputation: 2694
You must install mysql client tools/libraries. You have the sever installed not the client.
Upvotes: 2