ModuleNotFoundError: No module named ‚_sqlite3‘ – SOLUTION for CentOS

I had problem with Python standard library _sqlite3 in one python tool on server….

PROBLEM EXAMPLE

python3 -c „import sqlite3;print(sqlite3.version)“
Traceback (most recent call last):
File „“, line 1, in
File „/usr/local/lib/python3.7/sqlite3/init.py“, line 23, in
from sqlite3.dbapi2 import *
File „/usr/local/lib/python3.7/sqlite3/dbapi2.py“, line 27, in
from _sqlite3 import *
ModuleNotFoundError: No module named ‚_sqlite3‘

PROBLEM SOLUTION:

After many hours googling and find solution – reinstalling Python on CentOS server !!!

yum reinstall python3

Is this Ok ? Yes

SUCCESSFULL TEST

python3 -c „import sqlite3;print(sqlite3.version)“
2.6.0