title: Running Jupyter Notebook from cmd raises ModuleNotFoundError: No module named pysqlite2
body: <p><strong>The problem:</strong></p>
  
  <p>After reinstalling <a href="https://www.anaconda.com/download/#windows" rel="noreferrer">Anaconda</a> I can no longer navigate to a folder using the command window where I've got some <code>.pynb</code> files, type <code>jupyter notebook</code> and get things up and running. I'm getting these errors:</p>
  
  <blockquote>
    <p>C:\scripts\notebooks>jupyter notebook Traceback (most recent call
    last):   File
    "C:\Users\MYUSERID\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py",
    line 10, in 
        import sqlite3   File "C:\Users\MYUSERID\AppData\Local\Continuum\anaconda3\lib\sqlite3__init__.py",
    line 23, in 
        from sqlite3.dbapi2 import *   File "C:\Users\MYUSERID\AppData\Local\Continuum\anaconda3\lib\sqlite3\dbapi2.py",
    line 27, in 
        from _sqlite3 import * ImportError: DLL load failed: Procedyre not found</p>
    
    <p>During handling of the above exception, another exception occurred:</p>
    
    <p>Traceback (most recent call last):   File
    "C:\Users\MYUSERID\AppData\Local\Continuum\anaconda3\Scripts\jupyter-notebook-script.py",
    line 6, in 
        from notebook.notebookapp import main   File "C:\Users\MYUSERID\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\notebookapp.py",
    line 86, in 
        from .services.sessions.sessionmanager import SessionManager   File
    "C:\Users\MYUSERID\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py",
    line 13, in 
        from pysqlite2 import dbapi2 as sqlite3 ModuleNotFoundError: No module named 'pysqlite2'</p>
  </blockquote>
  
  <hr>
  
  <p><strong>What I've tried:</strong></p>
  
  <hr>
  
  <p>I've checked the fresh Anaconda folders, and everything seems to be where it should wrt <code>sqlite</code>, <code>sqlite3</code> and <code>pysqlite2</code>.</p>
  
  <p>Since last time I downloaded Anaconda, it seems they've changed the default install folders, so I was sure everything would be OK after editing my user and system environment variables according to the post <a href="https://stackoverflow.com/questions/47318033/jupyter-notebook-will-not-open-from-command-prompt">Jupyter notebook will not open from command prompt</a> just in case checking the <code>Add to Path</code> option upon reinstalling Anaconda was not enough. But I'm still getting the same error messages.</p>
  
  <p>When I launch Jupyter from the Anaconda Navigator, everything runs fine. </p>
  
  <p>A similar question has been asked, but not answered, for Ubuntu here: <a href="https://stackoverflow.com/questions/47771364/2x-modulenotfounderror-jupyter-notebook">2x ModuleNotFoundError Jupyter notebook</a></p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <hr>
  
  <p>When I use and Anaconda Prompt, jupyter also starts running just fine when entering <code>jupyter notebook</code>. So why bother with the command window? The anaconda prompt command does not open ipynb files automatically in the deafault web browser. My earlier setup with the windows command window (and a batch file) did that and I think it was very useful.</p>
  
  <hr>
  
  <p><strong>System details:</strong></p>
  
  <pre><code>Windows 7, 64 bit
  Anaconda 2018.12
  Jupyter Notebook 5.7.4
  Python 3.7.1
  IPython 7.2.0
  </code></pre>