2013-07-20 69 views
2

免责声明:我已经尝试了许多搜索和程序来让这个工作,因为我发现试图谷歌这个问题,但似乎没有工作。MYSqlDb和Python一起玩好

我正在以下,当我尝试导入MySQLdbPython的交互式shell ...

Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) 
    [GCC 4.2.1 (Apple Inc. build 5664)] on darwin 
    Type "help", "copyright", "credits" or "license" for more information. 
    >>> import MySQLdb 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
     File "MySQLdb/__init__.py", line 23, in <module> 
     (version_info, _mysql.version_info)) 
    ImportError: this is MySQLdb version (1, 2, 4, 'beta', 4), but _mysql is version (1, 2, 4, 'final', 1) 

做什么有什么建议?我已经安装MySQLdb通过pip

回答

1

我没有一个Mac,所以我不能真正测试这个,但是,Mac似乎有这个模块的问题。你有没有看过这个人的网站?使用Mac进行安装似乎非常彻底。

http://learninglamp.wordpress.com/2010/02/21/mysqldb-python-mysql-and-os-x-a-match-made-in-satans-bum/

希望这有助于你出去了一下。

+0

我以前没有见过,但我已经完成了其中一些步骤。我最终通过重新安装django来解决这个问题。感谢你的回答。 – CodeTalk

相关问题