Skip to content Skip to sidebar Skip to footer

Mysqlclient Instal Error: "raise Exception("wrong Mysql Configuration: Maybe Https://bugs.mysql.com/bug.php?id"

I am trying to install mysqlclient to my Python 3.6. Originally what i want to install is MySQLdb, however it was saying that MySQLdb does not work with Python 3 (still?). So i swi

Solution 1:

It's a bug since November 2017. I had the same error and that's what helped:

  1. Make changes to mysql_config file in mysqlclient-python or mysql-connector-c or libmysqlclient (depending on what you are using)

    Change

# on macOS, on or about line 112:# Create optionslibs="-L$pkglibdir"libs="$libs -l "

to:

# Create optionslibs="-L$pkglibdir"libs="$libs -lmysqlclient -lssl -lcrypto"
  1. Add following to the end of your .bash_profilehow to do that:
export PATH="/usr/local/opt/openssl/bin:$PATH"export LDFLAGS="-L/usr/local/opt/openssl/lib"export CPPFLAGS="-I/usr/local/opt/openssl/include"
  1. Run pip install mysqlclient, that should work now.

For more info check this link, look at the "Note about bug of MySQL Connector/C on macOS" section.

Post a Comment for "Mysqlclient Instal Error: "raise Exception("wrong Mysql Configuration: Maybe Https://bugs.mysql.com/bug.php?id""