如何使用 Python 修复 Sqlite3 不同版本?

如何使用 Python 修复 Sqlite3 不同版本?

我在 centOS 上有 sqlite 版本3.7.17。然后我从源代码安装3.28.0

不幸的是,sqlite3python 模块仍在使用版本3.7.17

我是否必须重新编译 python?

[root@jenkins ~]# python3.6
Python 3.6.8 (default, Jun 21 2019, 09:50:01) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.7.17'
>>> exit()
[root@jenkins ~]# sqlite3
SQLite version 3.28.0 2019-04-16 19:49:53
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .exit

相关内容