首页 > 解决方案 > 在 AWS 上修复 jupyter notebook

问题描述

我正在尝试设置 jupyter notebook 以在 AWS 上运行,我遵循了本指南 - https://medium.com/@alexjsanchez/python-3-notebooks-on-aws-ec2-in-15-mostly-简单步骤 2ec5e662c6c6

它有效,但我现在意识到,每次我在本地机器上启动 jupyter 时,它都会要求输入密码,而且保存的密码也不再有效地将我锁定在 jupyter 之外: 在此处输入图像描述

我推测它是因为我设置了到端口 8888 的 ssh 连接,这是 jupyter 默认使用的。但是,我在第 10 步中删除了 ssh 配置文件,但没有更改。在此处输入图像描述


我很困惑为什么 jupyter 不再正确启动,有人对我如何纠正这个有任何想法吗?

我还注意到从 EC2 实例启动 jupyter 时会给出一个令牌 在此处输入图像描述

但在我的情况下,没有给出

#Launching jupyter in notebook from EC2 enviornment
(base) [ec2-user@ip-172-31-59-151 ~]$ jupyter lab --no-browser
[I 14:49:49.917 LabApp] JupyterLab extension loaded from /home/ec2-user/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 14:49:49.917 LabApp] JupyterLab application directory is /home/ec2-user/anaconda3/share/jupyter/lab
[I 14:49:49.919 LabApp] Serving notebooks from local directory: /home/ec2-user
[I 14:49:49.919 LabApp] Jupyter Notebook 6.1.4 is running at:
[I 14:49:49.919 LabApp] http://localhost:8888/
[I 14:49:49.920 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

标签: linuxamazon-web-servicessshjupyter-notebookjupyter

解决方案


推荐阅读