Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named '_sqlite3' #267

Open
mathewrtaylor opened this issue Mar 8, 2024 · 0 comments
Open

ModuleNotFoundError: No module named '_sqlite3' #267

mathewrtaylor opened this issue Mar 8, 2024 · 0 comments

Comments

@mathewrtaylor
Copy link

mathewrtaylor commented Mar 8, 2024

Version: nltk-3.8.1
Home OS: Ubuntu 23.10
Python Version: 3.10.4
Error: ModuleNotFoundError: No module named '_sqlite3'

Steps:
- Activated venv (Python 3.10.4)
- insatlled nltk
- imported into script
- nlk.download()

Provides an error capturing:

nltk/corpus/__init__.py", line 64, in <module>
    from nltk.corpus.reader import *
nltk/corpus/reader/__init__.py", line 106, in <module>
    from nltk.corpus.reader.panlex_lite import *
nltk/corpus/reader/panlex_lite.py", line 15, in <module>
    import sqlite3

Then hops to my machine:

  File "/usr/local/lib/python3.10/sqlite3/__init__.py", line 57, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.10/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

Troubleshooting:
venv Installed SQLite3-0611 0.0.1 -> Same error
venv Installed SQLite4 0.1.1 -> Same error
Host OS Installed libsqlite3-dev -> Same error
Went to ..../nltk/corpus/reader/panlex_lite.py and edited to install sqlite4 -> No error, script just stops.
Forced reinstall -> Same Error

@mathewrtaylor mathewrtaylor changed the title ModuleNotFoundError: No modeule named '_sqlite3' ModuleNotFoundError: No module named '_sqlite3' Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant