首先
yum install sqlite-devel -y
然后重装下python3(一定要重装)
# cd Python-3.4.2
# ./configure --prefix=/usr/local/python3
# make && make install
测试sqlite3模块,没提示错误就说明成功了
<pre name="code" class="python">[root@mail Python-3.4.2]# python3
Python 3.4.2 (default, Jul 20 2016, 22:36:42)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>>