Jupyter Notebook 在 conda base 下工作但不在虚拟环境下工作

Jupyter Notebook working under conda base but not under virtual environment

我创建了一个名为 "earthfault" 的虚拟环境,并使用 conda install jupyter 安装了 jupyter notebook。 安装成功。当我尝试启动时,我打开了一个网络浏览器,地址为 http://localhost:8888/tree,但页面为空白。

Jupyter notebook 在基础环境下运行良好:

D:\projects\conda activate

(base) D:\projects\jupyter notebook

但是当我尝试使用新的虚拟环境时:

D:\projects\conda activate earthfault

(earthfault) D:\projects\jupyter notebook

页面空白。

我试过没有成功:

当我在浏览器中粘贴 URL 时,我在命令行上看到出现的行:

[I 15:07:21.628 NotebookApp] 302 GET /?token=64c5452fe53980acc1134f878f822076748204b9fed4fb60 (::1) 1.00ms

我使用的版本(在 base 中成功,在 earthfault 中失败):

这是我用来创建虚拟环境的environment.yml

name: earthfault
dependencies:
  - numpy==1.15.1
  - pandas==0.23.4
  - matplotlib==2.2.3
  - xlrd==1.2.0
  - python==3.7.0
  - jupyter==1.0.0
  - jupyter_client==5.2.3
  - jupyter_console==5.2.0
  - pip:
    - xhtml2pdf==0.2.3

您是否尝试过在基本环境中打开 jupyter 笔记本,然后从那里更改环境。为此,您需要安装 nb_conda 包。这是 link 获取它的方法:
https://github.com/Anaconda-Platform/nb_conda