Error report when installing mysqlclient in django environment of mac

the first step is to execute pip3 install mysqlclient
: Collecting mysqlclient
Using cached pythonhosted.org/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz" rel=" nofollow noreferrer "> https://files.pythonhosted.or.

Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/9b/91g43prx0_z9kz_wg73pq05h0000gn/T/pip-install-5erpea0o/mysqlclient/setup.py", line 17, in <module>
    metadata, options = get_config()
  File "/private/var/folders/9b/91g43prx0_z9kz_wg73pq05h0000gn/T/pip-install-5erpea0o/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/9b/91g43prx0_z9kz_wg73pq05h0000gn/T/pip-install-5erpea0o/mysqlclient/setup_posix.py", line 54, in <listcomp>
    libraries = [dequote(i[2:]) for i in libs if i.startswith("-l")]
  File "/private/var/folders/9b/91g43prx0_z9kz_wg73pq05h0000gn/T/pip-install-5erpea0o/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/9b/91g43prx0_z9kz_wg73pq05h0000gn/T/pip-install-5erpea0o/mysqlclient/

the second step is to find mysql_config to modify

< H1 > Create options < / H1 >

libs= "- L$pkglibdir"
libs= "$libs-lmysqlclient-lssl-lcrypto"
step 3: install again or report the same error as the first time

Mar.20,2021

you can try pymsql, this library is also easy to use

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea0be2-478df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea0be2-478df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?