2011-10-28 20 views
0

您好我想在mac上安裝mysqldb for python,下面是跟蹤。誰能幫忙?在mac上python的mysqldb有什麼問題

>>> import MySQLdb 
/Library/Python/2.6/site-packages/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /Library/Python/2.6/site-packages/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg/_mysql.pyc, but /Users/christopherfarm/Downloads/MySQL-python-1.2.3 is being added to sys.path 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "MySQLdb/__init__.py", line 19, in <module> 
    import _mysql 
    File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 7, in <module> 
    File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 6, in __bootstrap__ 
ImportError: dlopen(/Users/christopherfarm/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib 
    Referenced from: /Users/christopherfarm/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so 
    Reason: image not found 

回答