我想用自定义文件头编译sqlite 我按照这里给出的步骤http://trac.edgewall.org/wiki/PySqlite
Download pysqlite
Extract it
export CFLAGS="-DSQLITE_FILE_HEADER=\\\"vivek\\\""
Run python setup.py build_static
python setup.py install -f
但当运行python并检查sqlite版本时
^{pr2}$它正在提供旧版本的sqlite。我想应该是3。 我试着打开数据库,但遇到了错误
sqlite3.DatabaseError: file is encrypted or is not a database
Python Version
python --version
Python 2.7.3
从Trac站点上的PySqlite页面顶部:
您使用的是Python2.7,因此需要安装自定义版本。pysqlite已经与python版本绑定在一起了。在
pysqlite
是使sqlite可用于python的“粘合剂”。系统sqlite本身需要升级,而不是glue库。在见How can I upgrade the sqlite3 package in Python 2.6?
相关问题 更多 >
编程相关推荐