No Module Named _Sqlite3

ImportError: No module named 'sqlite3'

I Solved this issue by commenting out
import sqlite3 in the panlex_lite.py file present inside nltk library folder and also commented out sqlite3 connection string present inside this file and the code works now. This solution will only work if you are intented to use nltk only but not sqlite3

sqlite ImportError: No module named _sqlite3 Google App Engine

From this answer:

The sqlite3 is an optional part of the standard library.

So it is not installed via pip and thus using the requirements.txt file. But it needs some package level dependencies libsqlite3-dev or sqlite-devel that don't come in the Google App Engine Python3 runtime. So it is not possible to use sqlite3 on Google App Engine Standard.

The solution is to use Cloud Run, which will allow you to run your application in a Docker container and you will be able to customize your runtime. You can start with this Quickstart guide or check this answer that I provide about the same issue with other library.

No module named '_sqlite3' Python 3.7.5 Centos 7

So I finally find a fix:

I delete all the python binaries and linked files/folders from /usr/local/bin the I have delete /usr/local/lib/python3.7.

The I have re-install Python from sources and now SQLite works like a charm.

I think I must have issue with relicate of previous Python installation.



Related Topics



Leave a reply



Submit