我有一个非常奇怪的问题,我的64位python与sqlite3工作正常,导入sqlite3时没有错误。但是,我的32位python将无法正常工作,这是错误消息。我使用自制软件安装了python,我使用的是最新版本的OS X Lion和Xcode。任何帮助将不胜感激。
编辑:在我朋友的电脑上,也是一个mac,sqlite3兼容32位和64位python。
Python 2.7.2 (default, Mar 19 2012, 20:52:31)
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.54)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: dlopen(/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_sqlite3.so, 2): Symbol not found: _sqlite3_aggregate_context
Referenced from: /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_sqlite3.so
Expected in: dynamic lookup