我在虚拟机(在 Mac 上)上运行 ubuntu 16.04,在 aws ec2 ubuntu 18.04 上运行。我正在尝试运行 Jupiter 笔记本aws.ec2
并尝试通过本地 Ubuntu 上的网络浏览器远程访问它。
我能够访问远程 ubuntu(aws.ec2) 终端。在我按照这个步骤操作之后link
我在第9步遇到以下错误。
我从头开始重新安装了 3 次(包括本地 ubuntu 和 aws ec2 实例),但到目前为止没有任何进展。
Last login: Thu Nov 1 06:34:07 2018 from 134.1****
ubuntu@ip-172-***:~$ export XDG_RUNTIME_DIR=""
ubuntu@ip-172-***:~$ jupyter notebook
[I 06:40:19.525 NotebookApp] Serving notebooks from local directory: /home/ubuntu
[I 06:40:19.528 NotebookApp] The Jupyter Notebook is running at:
[I 06:40:19.528 NotebookApp] https:// **** :8888/?token=727fbb120d19f55a435c1*****
[I 06:40:19.528 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 06:40:19.529 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
https://(ip-172-31-***** .0.1):8888/?token=727fbb120d19f55a435c14*********
ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(4, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(4, 1)>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/platform/asyncio.py", line 122, in _handle_events
handler_func(fileobj, events)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/netutil.py", line 262, in accept_handler
callback(connection, address)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/tcpserver.py", line 263, in _handle_connection
do_handshake_on_connect=False)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/netutil.py", line 565, in ssl_wrap_socket
context = ssl_options_to_context(ssl_options)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/netutil.py", line 540, in ssl_options_to_context
context.load_cert_chain(ssl_options['certfile'], ssl_options.get('keyfile', None))
PermissionError: [Errno 13] Permission denied
ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(4, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(4, 1)>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/platform/asyncio.py", line 122, in _handle_events
handler_func(fileobj, events)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/netutil.py", line 262, in accept_handler
callback(connection, address)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/tcpserver.py", line 263, in _handle_connection
do_handshake_on_connect=False)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/netutil.py", line 565, in ssl_wrap_socket
context = ssl_options_to_context(ssl_options)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tornado/netutil.py", line 540, in ssl_options_to_context
context.load_cert_chain(ssl_options['certfile'], ssl_options.get('keyfile', None))
PermissionError: [Errno 13] Permission denied
Note1:在ec2实例上,Ubuntu有18.04版本,它附带了python 3.6.3,然后我必须在其顶部安装anaconda,然后一旦我输入$python3,Python版本现在是3.5.2。
Note2:尽管将 anaconda 安装到 EC2 后,python 版本降级为 3.5.2
一旦我检查了以下目录 /usr/local/lib/ ,只有 python3.6 文件夹存在,然后我输入 $sudo chmod 777 dist-packages/
然后$jupyter笔记本,然后复制令牌链接并与dns结合,但仍然不起作用。