我有一个正在运行的 Google 深度学习虚拟机,我设置了一个 SSH 隧道,当我导航到 http://localhost:8080 时,我已连接到正在运行的 Jupyter Lab 实例。运行命令 sudo service jupyter status
告诉我该服务正在正确运行。
现在,我想使用 Visual Studio Code 连接到 Jupyter 实例。我尝试了 [Ctrl]+[Shift]+[P] 和“Python:指定 Jupyter 服务器 URI”并输入 http://localhost:8080在出现的提示中。但是,我收到一条错误消息:
Failed to connect to remote Jupyter notebook.
Check that the Jupyter Server URI setting has a valid running server specified.
http://localhost:8080/
Error: Failed to connect to password protected server. Check that password is correct.
不幸的是,documentation does not say very much 。
有人有将 VSCode 连接到远程服务器的经验吗?谢谢。
最佳答案
显然,您必须设置密码。
我按照说明here进行操作创建散列密码。然后我编辑了我的jupyter_notebook_config.py
文件并编辑行 c.NotebookApp.password = '<my_super_secret_hash>'
。最终,我可以连接 VSCode。
关于python - 使用 VSCode 连接到 Jupyter 实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56852835/