Error when starting Jupyter

Traceback (most recent call last):
File “C:\ProgramData\anaconda3\Lib\site-packages\notebook\services\sessions\sessionmanager.py”, line 9, in
import sqlite3
File “C:\ProgramData\anaconda3\Lib\sqlite3_init_.py”, line 57, in
from sqlite3.dbapi2 import *
File “C:\ProgramData\anaconda3\Lib\sqlite3\dbapi2.py”, line 27, in
from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\ProgramData\anaconda3\Scripts\jupyter-notebook-script.py”, line 5, in
from notebook.notebookapp import main
File “C:\ProgramData\anaconda3\Lib\site-packages\notebook\notebookapp.py”, line 83, in
from .services.sessions.sessionmanager import SessionManager
File “C:\ProgramData\anaconda3\Lib\site-packages\notebook\services\sessions\sessionmanager.py”, line 12, in
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named ‘pysqlite2’

1 Like

The error you’re encountering indicates an issue with loading the SQLite DLL in your Anaconda environment. This is a common issue with certain Anaconda installations on Windows.

  1. Update Anaconda: Make sure your Anaconda distribution is up-to-date. You can update Anaconda using conda update --all in the Anaconda Prompt.
  2. Reinstall SQLite: Try reinstalling SQLite within your Anaconda environment. Use conda install sqlite in the Anaconda Prompt.

Anaconda says I have the package installed. I also tried removing Jupyter and resintalling it. This also fails.
(base) C:\Users\dleonard>conda install sqlite
Channels:

  • conda-forge
  • defaults
    Platform: win-64
    Collecting package metadata (repodata.json): done
    Solving environment: done

All requested packages already installed.