centos 7解决No module named ‘_sqlite3’ python3.7.3

 第一种:下载安装 sqlite 重新编译

yum install sqlite-devel ,

2. 重新编译python

./configure --prefix=/usr/local/python3/ --enable-loadable-sqlite-extensions   && make && make install

第二种:手动拷贝

如果在python虚拟环境下,需要将.so文件拷贝到

然后输入python3,在python3环境下输入

import sys

sys.path

cp /usr/local/aegis/PythonLoader/lib/python2.7/lib-dynload/_sqlite3.so /root/Envs/article_spider/lib/python3.7/lib-dynload/

 

 

你可能感兴趣的:(Python)