小编jra*_*maa的帖子

如何在python中使用最新的sqlite3版本

我需要在Amazon Linux中将sqlite版本3.8或更高版本与python一起使用。

我将sqlite安装更新为最新版本:

$ sqlite3 -version
3.22.0 2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2171d
Run Code Online (Sandbox Code Playgroud)

我也更新了pysqlite版本

pip install --upgrade pysqlite
Run Code Online (Sandbox Code Playgroud)

但是,我的pysqlite似乎仍然仅支持sqlite版本3.7:

$ python
>>> import sqlite3
>>> sqlite3.version
'2.6.0'
>>> sqlite3.sqlite_version
'3.7.17'
>>>
>>> from pysqlite2 import dbapi2 as sqlite
>>> sqlite.version
'2.8.3'
>>> sqlite.sqlite_version
'3.7.17'
Run Code Online (Sandbox Code Playgroud)

如何更新sqlite python API以支持较新版本的sqlite?

python sqlite pysqlite

6
推荐指数
2
解决办法
1813
查看次数

标签 统计

pysqlite ×1

python ×1

sqlite ×1