>>> import sqlite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sqlite'
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/python3.8.8/lib/python3.8/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/opt/python3.8.8/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
解决方案:
1、yum install sqlite-devel
2,重新编译Python
./configure
make
make install
No module named '_sqlite3'
报错内容:
>>> import sqlite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sqlite'
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/python3.8.8/lib/python3.8/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/opt/python3.8.8/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
解决方案:
1、yum install sqlite-devel
2,重新编译Python
./configure
make
make install
问题背景:Centos安装python后,无法导入sqlite3和sslNo module named '_sqlite3'>>> import sqliteTraceback (most recent call last): File "<stdin>", line 1, in <module>ModuleNotFoundError: No module named 'sqlite'>>> import sqlite3Tra