mysql_config not found when installing mysqldb python interface

前端 未结 30 1444
暗喜
暗喜 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条回答
  •  既然无缘
    2020-11-22 07:42

    I got the same error while trying to install mysql-python.

    This is how I fixed it.

    sudo PATH=/usr/local/mysql/bin/:$PATH pip install mysql-python
    

    The problem was that the installer could not find the mysql_config in the default path. Now it can ..and it worked..

     15 warnings generated.
        clang -bundle -undefined dynamic_lookup -Wl,-F. build/temp.macosx-10.8-intel-2.7/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.8-intel-2.7/_mysql.so -arch x86_64
    
    Successfully installed mysql-python
    Cleaning up...
    

    Hope this helps.

    Thanks.

提交回复
热议问题