mysql_config not found when installing mysqldb python interface

前端 未结 30 1851
暗喜
暗喜 2020-11-22 06:56

I am trying to get a Python script to run on the linux server I\'m connected to via ssh. The script uses mysqldb. I have all the other components I need, but when I try to i

30条回答
  •  Happy的楠姐
    2020-11-22 07:39

    If you're on macOS and already installed mysql@5.7 via brew install:

    1. brew install mysql-connector-c
    2. brew unlink mysql@5.7
    3. brew link --overwrite --dry-run mysql@5.7 first, to see what symlinks are getting overwritten
    4. brew link --overwrite --force mysql@5.7 to actually overwrite mysql-related symlinks with mysql@5.7
    5. pip install mysqlclient

提交回复
热议问题