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' #666

Open
fishcharlie opened this issue Nov 17, 2024 · 1 comment
Open

ModuleNotFoundError: No module named '_sqlite3' #666

fishcharlie opened this issue Nov 17, 2024 · 1 comment

Comments

@fishcharlie
Copy link

I keep getting an error when trying to run Create an empty ML backend: label-studio-ml create my_ml_backend. Here is my complete stack trace:

Traceback (most recent call last):
  File "/home/charliefish/.pyenv/versions/3.12.0/bin/label-studio-ml", line 33, in <module>
    sys.exit(load_entry_point('label-studio-ml', 'console_scripts', 'label-studio-ml')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/charliefish/.pyenv/versions/3.12.0/bin/label-studio-ml", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/charliefish/.pyenv/versions/3.12.0/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/charliefish/.pyenv/versions/3.12.0/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/charliefish/label-studio-ml-backend/label_studio_ml/server.py", line 13, in <module>
    from .model import get_all_classes_inherited_LabelStudioMLBase
  File "/home/charliefish/label-studio-ml-backend/label_studio_ml/model.py", line 31, in <module>
    from .cache import create_cache
  File "/home/charliefish/label-studio-ml-backend/label_studio_ml/cache.py", line 2, in <module>
    import sqlite3
  File "/home/charliefish/.pyenv/versions/3.12.0/lib/python3.12/sqlite3/__init__.py", line 57, in <module>
    from sqlite3.dbapi2 import *
  File "/home/charliefish/.pyenv/versions/3.12.0/lib/python3.12/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
@makseq
Copy link
Member

makseq commented Dec 19, 2024

sqlite library is not installed on your system. Try to do this:

sudo apt-get install libsqlite3-dev

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

2 participants