Python Berkeley DB / Sqlite
发布时间:2021-01-17 08:40:04 所属栏目:Python 来源:互联网
导读:由于BerkeleyDB可以使用SQLite api,因此 python可以使用sqlite模块连接到BerkeleyDB. 这篇文章建议使用其他东西,但可能是在Api之前同步写的. Best Python module for Berkeley DB? 可以获得简单的连接字符串.如果有已知问题,请发帖.我正在探索这个话题. 在lin
由于BerkeleyDB可以使用SQLite api,因此 python可以使用sqlite模块连接到BerkeleyDB. 这篇文章建议使用其他东西,但可能是在Api之前同步写的. 可以获得简单的连接字符串.如果有已知问题,请发帖.我正在探索这个话题. 在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.gz cd 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 pysqlite make make prefix=/tmp/bdb install 从http://code.google.com/p/pysqlite/获得pysqlite2的副本,我使用了hg结帐. include_dirs=/tmp/bdb/include library_dirs=/tmp/bdb/lib 然后在pysqlite中cd: python setup.py build python setup.py install 或者没有安装: cd build/lib.linux-x86_64-2.7 python from pysqlite2 import dbapi2 conn = dbapi2.connect('test.db') c = conn.cursor() c.execute('bla bla bla sql') (编辑:岳阳站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- django – 必须使用对象pk或slug调用通用详细信息视图
- python基础学习16----模块
- python – 在numpy数组中获取具有最小长度的相同条目的序列
- python – Django 1.7 makemigrations – ValueError:无法
- python – scikit-learn是否执行“真正的”多元回归(多个因
- python – Django get_or_create和ManytoManyField
- 示例python twisted事件驱动的Web应用程序递增请求数量为2,
- 使用python,自动确定用户当前时区的最准确方法是什么
- python:进程池
- python-3.x – 多处理队列子类问题