I'm trying to install mysqlclient to connect to my database with django, but get the following error:
(venv) dhcp-ccc-12919:project user$ pip3 install mysqlclient
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/l4/0f1p1xlj3hlbxr6rzgqzrxmh0000gn/T/pip-install-lo7y8khq/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/l4/0f1p1xlj3hlbxr6rzgqzrxmh0000gn/T/pip-install-lo7y8khq/mysqlclient/setup_posix.py", line 54, in get_config
libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "/private/var/folders/l4/0f1p1xlj3hlbxr6rzgqzrxmh0000gn/T/pip-install-lo7y8khq/mysqlclient/setup_posix.py", line 54, in <listcomp>
libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "/private/var/folders/l4/0f1p1xlj3hlbxr6rzgqzrxmh0000gn/T/pip-install-lo7y8khq/mysqlclient/setup_posix.py", line 12, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/l4/0f1p1xlj3hlbxr6rzgqzrxmh0000gn/T/pip-install-lo7y8khq/mysqlclient/
I have the following in my settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'todo',
'USER': 'root',
'PASSWORD': 'password'
}
}