[英]Google Colab wont connect to local runtime after update
我最近将 jupter_over_ws 更新到了 0.0.7 版,现在 Google Colab 拒绝连接我的本地运行时。
我尝试了多次迭代,在 Chrome 中启动本地主机,使用 --no-browser 等运行,并不断收到“禁止”403。
我试图连接到笔记本的最后一次迭代是:
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --NotebookApp.port_retries=0 --notebook-dir="" --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True --port=8888
非常感谢任何帮助
更新后需要先升级jupyter_http_over_ws:
pip install --upgrade jupyter_http_over_ws
其次,每次使用以下代码启动服务器时:
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0
它将在 Anaconda 的提示中显示一个新令牌,您需要复制。
当您在 Colab 中单击“ Connect to local runtime
,会出现一个框询问令牌,然后粘贴到那里。
如果您使用 Anaconda,则可以按照说明进行操作:
pip install --upgrade jupyter_http_over_ws>=0.0.7 && jupyter serverextension enable --py jupyter_http_over_ws
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8892 --NotebookApp.port_retries=0
http://localhost:8892/?token=fecaca2501d00f89971ab8fb4a5add3ff682ade7e63f7265
我通过从 jupyter .config 文件中删除密码来解决这个问题,然后复制并粘贴上面答案中概述的令牌 URL,以及官方 colab 文档中的概述:
https://research.google.com/colaboratory/local-runtimes.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.