我正在尝试使用 PyCharm 2016.1 中的 jupyter 笔记本。我打开之前创建的 iPython 笔记本,单击包含代码的单元格,然后运行它。系统提示我在默认 url 处启动 jupyter Notebook,然后单击“确定”。以下是“运行”窗口中的错误消息:
[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 Notebook 在 PyCharm 中使用默认 URL 启用。
最佳答案
Jupyter 将配置信息保存在 jupyter_notebook_config.py
中文件。您可以在 C:\Users\<user>\.jupyter
中找到它在 Windows 上或 ~\.jupyter
在Linux上。修改c.NotebookApp.notebook_dir
进入您保存笔记本的位置。也可以使用命令行来设置:
jupyter-notebook --notebook-dir=<path>
附上<path>
如果路径名中有空格,则在 Windows 上用双引号引起来。
如果您在升级到 jupyter 之前安装了 iPython,则 jupyter migration process使用旧 iPython 配置文件中的设置。也许自从您修改 iPython 以来已经很长时间了,这就是为什么您会看到 jupyter 出现意外的启动或运行行为。
此外,此 jupyter 命令可能有助于解决目录/路径问题:
jupyter --paths
关于pycharm - 在 pycharm 中使用 jupyter 笔记本 - 没有这样的笔记本目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36434496/