I have been trying for a few days to fix this, looking at other questions but I can't find a question wth the same error that I am getting.
I have been attempting to follow this tutorial https://realpython.com/learn/start-django/ and get to this point:
Database settings First, install MySQL-python, which is a database connector for Python:
$ pip install MySQL-python
Everything has worked okay up to here but when I try and install MySQL-python I get the following error:
(env) Camerons-MacBook-Pro:django15_project camrail$ pip install MySQL-python Collecting MySQL-python Using cached MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/3v/czm4shrx0yg5jts39qktf6t00000gn/T/pip-build-2rNsQQ/MySQL-python/setup.py", line 17, in <module> metadata, options = get_config() File "/private/var/folders/3v/czm4shrx0yg5jts39qktf6t00000gn/T/pip-build-2rNsQQ/MySQL-python/setup_posix.py", line 43, in get_config libs = mysql_config("libs_r") File "/private/var/folders/3v/czm4shrx0yg5jts39qktf6t00000gn/T/pip-build-2rNsQQ/MySQL-python/setup_posix.py", line 25, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) EnvironmentError: mysql_config not found ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3v/czm4shrx0yg5jts39qktf6t00000gn/T/pip-build-2rNsQQ/MySQL-python/ (env) Camerons-MacBook-Pro:django15_project camrail$
I found this answer https://opensourcehacker.com/2011/03/02/installing-mysql-python-connector-on-osx/ that says the MySQL utilities are not made available, so I followed their advice to fix it but to no avail. I have also tried installing developer tools xcode-select --install
as some have suggested. I have tried reinstalling ez_setup
.
Not really sure where to go from here, any help greatly appreciated.