【发布时间】:2021-12-10 02:17:35
【问题描述】:
我一直在尝试按照https://research.google.com/colaboratory/local-runtimes.html 上的指南连接 Google Colaboratory 中的本地运行时。运行“jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=9090 --NotebookApp.port_retries=0”时会产生以下错误消息:
jupyter_http_over_ws extension initialized. Listening on /http_over_websocket
[W 05:31:57.155 NotebookApp] Error loading server extension py
Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\lib\site-packages\notebook\notebookapp.py", line 1934, in init_server_extensions
mod = importlib.import_module(modulename)
File "C:\ProgramData\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'py'
[I 05:31:57.157 NotebookApp] Serving notebooks from local directory: C:\data
[I 05:31:57.157 NotebookApp] Jupyter Notebook 6.1.1 is running at:
[I 05:31:57.157 NotebookApp] http://localhost:9090/?token=7da2b30d93fc4e57bb4bfd4db2dcf4ce621d40f92f1f2846
[I 05:31:57.157 NotebookApp] or http://127.0.0.1:9090/?token=7da2b30d93fc4e57bb4bfd4db2dcf4ce621d40f92f1f2846
[I 05:31:57.158 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 05:31:57.161 NotebookApp]
该错误与Error loading Jupyter Notebook Extensions 有点相似,但是 jupyter_nbextensions_configurator 似乎不涉及这种情况。无论环境如何,错误都是相同的。重新安装 jupyter 和扩展没有帮助。
非常感谢任何帮助!
【问题讨论】:
-
看看这个可能对你有帮助stackoverflow.com/questions/62430455/…
-
更改端口或添加 --no-browser 遗憾的是不能解决问题。
标签: python jupyter-notebook google-colaboratory