这篇文章建议使用其他东西,但可能是在API之前同步写的.
Best Python module for Berkeley DB?
可以获得简单的连接字符串.如果有已知问题,请发帖.我正在探索这个话题.
在linux和windows上使用python 2.7.
解决方法 正如这里建议的 https://forums.oracle.com/forums/thread.jspa?threadID=2302793我已经尝试过使用python27的linux x86_64,这里是制作静态版本的步骤
我怀疑你的发行版有bdb sqlite API.
下载db-5.2.36.tar.gz
tar xzvf db-5.2.36.tar.gzcd db-5.2.36/build_unix/CFLAGS="-fPIC" ../dist/configure --enable-static --disable-shared --enable-sql-compat# you need -fPIC to build the python ext of pysqlitemakemake prefix=/tmp/bdb install
从http://code.google.com/p/pysqlite/获得pysqlite2的副本,我使用了hg结帐.
在setup.cfg中添加build_ext部分(还有两行注释行可以重用它们)
include_dirs=/tmp/bdb/includelibrary_dirs=/tmp/bdb/lib
然后在pysqlite中cd:
python setup.py buildpython setup.py install
或者没有安装:
cd build/lib.linux-x86_64-2.7pythonfrom pysqlite2 import dbAPI2conn = dbAPI2.connect('test.db')c = conn.cursor()c.execute('bla bla bla sql')总结
以上是内存溢出为你收集整理的Python Berkeley DB / Sqlite全部内容,希望文章能够帮你解决Python Berkeley DB / Sqlite所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)