Python MySQL wrong architecture error

后端 未结 12 2199

I\'ve been at this for some time and read many sites on the subject. suspect I have junk lying about causing this problem. But where?

This is the error when I impor

12条回答
  •  自闭症患者
    2020-12-08 05:17

    When the interpreter says is:

    You have installed MySQL_python-1.2.3c1 in /Library/Python/2.6/site-packages but you are adding to sys.path another version in /users/phoebebr/Downloads. When I try to import MySQLdb from the second directory, I've found that _mysql.so is from another architecture.

    SO, it seems that you ended with the wrong version of MySQLdb. Delete /Users/phoebebr/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp and /Users/phoebebr/Downloads/MySQL-python-1.2.3c1. Test again to see if the version in /library works. If not, donwload the binary for MacOS. In last instance, download the source of MySQL-python and compile it.

提交回复
热议问题