【发布时间】:2019-04-27 16:05:13
【问题描述】:
我正在尝试在本地运行 google colaboratory notebook。我遵循了 jupyter-notebook 提供的连接指南,其中列出了在本地端口上建立连接的步骤。
https://research.google.com/colaboratory/local-runtimes.html 提供建立连接的步骤。我已经完成了第 1 步和第 2 步,因为我已经安装了 Jupyter。 第 3 步要求我在 CMD 中执行以下操作:
jupyter notebook \
--NotebookApp.allow_origin='https://colab.research.google.com' \
--port=8888 \
--NotebookApp.port_retries=0
这就是问题发生的地方。我尝试执行以下代码但失败了。
代码:
jupyter notebook --NotebookApp.allow_origin = "https://colab.research.google.com" --port = 8888 --NotebookApp.port_retries= 0
错误:
[C 20:47:43.718 NotebookApp] 初始化期间遇到错误配置:
[C 20:47:43.718 NotebookApp] 无效参数:'--NotebookApp.allow_origin'
我尝试查看此 which is here 的 jupyter 配置文档。 该文档还建议创建一个名为 jupyter_notebook_config.py 的配置文件,该文件允许您为这些配置设置默认值。 我尝试为 NotebookApp.allow_origin 设置默认值,然后尝试通过传递 port 和 port_retries 参数来运行 jupyter notebook(假设 allow_origin 的默认值现在符合我的目的),然后尝试了,但这似乎不起作用好吧。
欢迎任何建议和帮助!
【问题讨论】:
标签: jupyter-notebook google-colaboratory