<p><strong>简短回答:</strong></p>
<p>这似乎是自<code>29.01.2019</code>起的版本问题,仅与以下内容有关:</p>
<p><a href="https://repo.continuum.io/archive/" rel="nofollow noreferrer">Anaconda3-2018.12-Windows-x86_64</a>:</p>
<pre><code>Jupyter Notebook 5.7.4
Python 3.7.1 (default, Dec 10 2018, 22:54:23)
IPython 7.2.0
</code></pre>
<p>查看下面详细信息中的列表,以查看从批处理启动Jupyter或甚至尝试安装nbExtensions时不会引发<code>ModuleNotFoundError: No module named pysqlite2</code>的版本。在</p>
<p>对于版本Anaconda3-2018.12,Jupyter<em>可以使用GokulDAS027<a href="https://stackoverflow.com/questions/35542444/using-a-bat-to-change-directories-and-run-jupyter">in this post</a>中的设置从批处理启动,但它不会在默认的web浏览器中自动打开。你也可以从水蟒导航器启动Jupyter而没有问题。在</p>
<p><strong>详情:</strong></p>
<hr/>
<p><strong>解决方案1</strong>:运行更详细的批处理</p>
<hr/>
<p>结果表明,GokulDAS027出于某种原因对问题<a href="https://stackoverflow.com/questions/35542444/using-a-bat-to-change-directories-and-run-jupyter">Using a .bat to change directories and run Jupyter</a>的建议将打开Jupyter,而不会引发sqlite错误消息:</p>
<p><code>C:\Users\**UserName**\Anaconda3\python.exe C:\Users\**UserName**\Anaconda3\cwp.py C:\Users\**UserName**\Anaconda3 C:\Users\**UserName**\Anaconda3\python.exe C:\Users\**UserName**\Anaconda3\Scripts\jupyter-notebook-script.py "**file location**"</code></p>
<p>在我的系统上,Jupyter不会自动打开默认的web浏览器。</em></strong>
另外,如果你想安装笔记本扩展,你会得到一个相关的错误消息。因为我觉得这不太令人满意,所以我开始更深入地研究这是否也是后来版本的Python的问题:</p>
<hr/>
<p><strong>解决方案2:</strong>安装旧版本的Anaconda</p>
<hr/>
<p>我注意到github上的一些评论<a href="https://github.com/jupyterlab/jupyterlab/issues/4181" rel="nofollow noreferrer">pysqlite2 is not used in Python 3</a>。我非常确定,大约一年前我已经在使用python3时没有<code>ModuleNotFoundError: No module named pysqlite2</code>,所以我测试了一些旧的Anaconda安装,以检查是否会引发相同的错误。在</p>
<p>对于最新版本(根据2019年1月29日),pysqlite2错误似乎只会引发</em></strong>:</p>
<p><a href="https://repo.continuum.io/archive/Anaconda3-2018.12-Windows-x86_64.exe" rel="nofollow noreferrer">Anaconda3-2018.12</a></p>
<pre><code>Jupyter Notebook 5.7.4
Python 3.7.1 (default, Dec 10 2018, 22:54:23)
IPython 7.2.0
</code></pre>
<p><strong>使用下面描述的系统设置(仍在Windows 7,64位)下,一切正常,这意味着:</strong></p>
<ol>
<li><p>Jupyter可以从命令提示符(不仅仅是Anaconda提示符)启动,方法是导航到文件夹并键入<code>jupyter notebook</code>,<em>和</em>它将在默认的web浏览器中自动启动。</p></li>
<li><p>nbExtensions可以使用<code>conda install -c conda-forge jupyter_contrib_nbextensions</code></p></li>
</ol>
<p><strong>来自</strong><a href="https://repo.continuum.io/archive/" rel="nofollow noreferrer">Anaconda Archive</a>的测试版本</p>
<p><strong>水蟒3-5.3.1</strong></p>
<pre><code>Jupyter Notebook 5.6.0
Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)]
IPython 6.5.0 An enhanced Interactive Python. Type '?' for help.
</code></pre>
<p><strong>水蟒3-4.4.0</strong></p>
<pre><code>Python 3.6.1 |Anaconda 4.4.0 (64-bit)|
IPython 5.3.0
</code></pre>
<p><strong>Python2-4.3.1-Windows-x86_64</strong></p>
<pre><code>Jupyter Notebook 4.3.1
Python 2.7.13 |Anaconda 4.3.1 (64-bit)|
IPython 5.1.0
</code></pre>