1

无法安装 sqlite 包装器。任何有关安装的帮助都会非常有帮助。

下载自

安装 sqlite3.version '2.6.0'

请在下面找到错误日志 -

sudo python setup.py install test
running install
running build
running build_ext
SQLite: Using system sqlite include/libraries
running install_lib
running install_egg_info
Removing /Library/Python/2.7/site-packages/apsw-3.7.16.2_r1-py2.7.egg-info
Writing /Library/Python/2.7/site-packages/apsw-3.7.16.2_r1-py2.7.egg-info
running test
Traceback (most recent call last):
File "setup.py", line 857, in <module>
 'win64hackvars': win64hackvars}
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 102, in run
import tests
 File "/Users/tj/Downloads/apsw-3.7.16.2-r1/tests.py", line 9, in <module>
import apsw
ImportError: dlopen(/Users/tj/Downloads/apsw-3.7.16.2-r1/apsw.so, 2): Symbol not found: _sqlite3_db_filename
Referenced from: /Users/tj/Downloads/apsw-3.7.16.2-r1/apsw.so
Expected in: flat namespace
in /Users/tj/Downloads/apsw-3.7.16.2-r1/apsw.so
4

1 回答 1

0

它正在拾取旧版本的系统 SQLite 共享库。MacOS 倾向于忽略您希望它使用的 SQLite 库并强制使用已知系统库。(许多操作系统组件,如 CoreData 依赖于 SQLite,这就是他们喜欢强制使用已知良好版本的原因。)

最简单的解决方法是使用文档中指定的命令行。它确保 SQLite 的私有副本嵌入在扩展中,因此将始终有效。

http://apidoc.apsw.googlecode.com/hg/build.html#recommended

python setup.py fetch --all build --enable-all-extensions install test

(我是 APSW 的作者)。顺便说一句,有一个 python-sqlite 邮件列表,您可能会发现它很有用。

于 2013-04-26T02:48:53.617 回答