在 pycharm 中使用 jupyter notebook - 没有这样的笔记本目录
using jupyter notebook in pycharm - no such notebook dir
我正在尝试使用 PyCharm 2016.1 的 jupyter notebook。我打开一个以前创建的 iPython 笔记本,单击包含代码的单元格,然后 运行 它。系统提示我以默认值 url 启动 jupyter notebook,然后单击“确定”。以下是来自 运行 window:
的错误消息
[C 13:04:23.979 NotebookApp] Bad config encountered during initialization:
The Jupyter HTML Notebook.
[C 13:04:23.979 NotebookApp] No such notebook dir: 'C:\Users\cb4\Documents\python'
iPython 笔记本在 PyCharm 中启用,默认为 url。
Jupyter 将配置信息保存在 jupyter_notebook_config.py
文件中。您可以在 Windows 上的 C:\Users\<user>\.jupyter
或 linux 上的 ~\.jupyter
中找到它。将 c.NotebookApp.notebook_dir
条目修改为您保存笔记本的位置。也可以使用命令行设置:
jupyter-notebook --notebook-dir=<path>
如果路径名中有 space,请将 Windows 上的 <path>
用双引号引起来。
如果您在升级到 jupyter 之前安装了 iPython,则 jupyter migration process 使用旧 iPython 配置文件中的设置。也许您修改 iPython 已经很长时间了,这就是为什么您看到 jupyter 出现意外启动或 运行 行为的原因。
此外,这个 jupyter 命令可能有助于解决 directory/path 问题:
jupyter --paths
刚遇到同样的问题并使用以下命令解决了它:
jupyter notebook --generate-config
更多信息在这里:http://jupyter-notebook.readthedocs.io/en/stable/config.html
它提示我将当前配置替换为默认配置。因此,如果您可以摆脱当前的配置,这是一个简单的选择。
我通过以下方式解决了这个问题:
以管理员身份打开 cmd
输入:
jupyter notebook --config=/home/john/mystuff/jupyter_notebook_config.json
注意:
在 运行 上面的脚本确保之前,必须卸载 Anaconda 和 Jupyter Lab
- 删除C:/盘中的所有文件
- 然后安装重新安装最新的Python3,并且add/set环境路径正确,建议把Pyhon放在主根目录C:/Python不是c :/User/.../Python ,但是你需要安装 Jupyter notebook usin : pip install Jupyter notebook **有时你需要安装 get-pip.py 才能使用 pip
- 有时会缺少 jupyter_notebook_config.py 要创建 jupyter_notebook_config.py 文件,请在安装 python 后,
- 您可以使用以下命令行:
jupyter notebook --generate-config
我正在尝试使用 PyCharm 2016.1 的 jupyter notebook。我打开一个以前创建的 iPython 笔记本,单击包含代码的单元格,然后 运行 它。系统提示我以默认值 url 启动 jupyter notebook,然后单击“确定”。以下是来自 运行 window:
的错误消息[C 13:04:23.979 NotebookApp] Bad config encountered during initialization:
The Jupyter HTML Notebook.
[C 13:04:23.979 NotebookApp] No such notebook dir: 'C:\Users\cb4\Documents\python'
iPython 笔记本在 PyCharm 中启用,默认为 url。
Jupyter 将配置信息保存在 jupyter_notebook_config.py
文件中。您可以在 Windows 上的 C:\Users\<user>\.jupyter
或 linux 上的 ~\.jupyter
中找到它。将 c.NotebookApp.notebook_dir
条目修改为您保存笔记本的位置。也可以使用命令行设置:
jupyter-notebook --notebook-dir=<path>
如果路径名中有 space,请将 Windows 上的 <path>
用双引号引起来。
如果您在升级到 jupyter 之前安装了 iPython,则 jupyter migration process 使用旧 iPython 配置文件中的设置。也许您修改 iPython 已经很长时间了,这就是为什么您看到 jupyter 出现意外启动或 运行 行为的原因。
此外,这个 jupyter 命令可能有助于解决 directory/path 问题:
jupyter --paths
刚遇到同样的问题并使用以下命令解决了它:
jupyter notebook --generate-config
更多信息在这里:http://jupyter-notebook.readthedocs.io/en/stable/config.html
它提示我将当前配置替换为默认配置。因此,如果您可以摆脱当前的配置,这是一个简单的选择。
我通过以下方式解决了这个问题:
以管理员身份打开 cmd
输入:
jupyter notebook --config=/home/john/mystuff/jupyter_notebook_config.json
注意: 在 运行 上面的脚本确保之前,必须卸载 Anaconda 和 Jupyter Lab
- 删除C:/盘中的所有文件
- 然后安装重新安装最新的Python3,并且add/set环境路径正确,建议把Pyhon放在主根目录C:/Python不是c :/User/.../Python ,但是你需要安装 Jupyter notebook usin : pip install Jupyter notebook **有时你需要安装 get-pip.py 才能使用 pip
- 有时会缺少 jupyter_notebook_config.py 要创建 jupyter_notebook_config.py 文件,请在安装 python 后,
- 您可以使用以下命令行:
jupyter notebook --generate-config