Python 3.7, Failed building wheel for MySql-Python

前端 未结 11 1466
忘了有多久
忘了有多久 2020-12-14 08:53

I am new to python and I am trying django framework that involves some MySql and ran into this error when try to do pip install mysqlclient and down the lines o

11条回答
  •  旧巷少年郎
    2020-12-14 09:23

    As of 2019, here is how to run smoothly pip install mysqlclient on MacOS:

    brew info openssl and follow the commands at the bottom

      echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc
    

    Other approaches:

    • brew install/upgrade/reinstall mysql : did not fix the issue for me, but has the nice side effect to make sure your installation is clean.
    • brew install mysql-connector-c : to make that work you have to unlink mysql, which ruins your setup and it did not fix the issue for me.

提交回复
热议问题