ModuleNotFoundError: No module named '_sqlite3'

  1. 当前环境
[root@test ~]# cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)
[root@test ~]# python3 -V
Python 3.7.9
  1. 安装依赖包
[root@test ~]# yum -y install sqlite-devel
  1. 重新编译python3。如需查看python3安装步骤请移目另一篇文章
[root@test ~]# cd /usr/local/src/Python-3.7.9
[root@test Python-3.7.9]# ./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl
[root@test Python-3.7.9]# make && make install


写作不易,转载请注明出处,谢谢~~

上一篇:ModuleNotFoundError: No module named ‘absl‘


下一篇:1005.K次取反侯最大化的数组和.简单易懂