1. 程式人生 > >python3提示sqlite3模組不存在解決方法

python3提示sqlite3模組不存在解決方法

首先
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">[[email protected] 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
>>>