升级sqlite: https://www.cnblogs.com/richerdyoung/p/12395523.html
安装python3: https://www.cnblogs.com/richerdyoung/p/12396200.html
请先照以上两篇文章的方法,安装好sqlite 和 python3
查看命令
sqlite3 -version
python3 -V
从新编译python3, 唯一的区别是,在编译时略有不同。
原来的编译过程:
cd /usr/local/python-3.7/
./configure --prefix=/usr/local/sbin/python-3.7
make && make install
修改为
cd /usr/local/python-3.7/
LD_RUN_PATH=/usr/local/lib ./configure LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" --prefix=/usr/local/sbin/python-3.7
LD_RUN_PATH=/usr/local/lib make
make && make install
照此安装后,已经可以使用最新版SQLite了:
[[email protected] ~]# python3
Python 3.7.0 (default, Mar 2 2020, 18:15:12)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.28.0'
>>>
原文地址:https://www.cnblogs.com/richerdyoung/p/12397244.html
时间: 2024-10-11 06:33:17