libmysqlclient15-dev on macs? libmysqlclient15-dev on macs? ruby ruby

libmysqlclient15-dev on macs?


brew install mysqlfixed this for me


I know this is old, but google got me here. So let's say the solution in 2018 for python3 on OSX.

brew install mysql-clientecho 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profilesource ~/.bash_profilepip install mysqlclient


I just had the same problem and only got a partial working solution.Here are the steps I made to make it work:

  • brew install mysql-client
  • brew install mysql-connector-c

IF YOU HAVE ZSH:

  • echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.zshrc

  • source ~/.zshrc

ELSE:

  • echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile

  • source ~/.bash_profile

Now for the installation itself:

  • LDFLAGS=-L< your openssl lib folder location > pip install mysqlclient==< version >

for example:LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient==1.3.12