Problem about setting jupyter notebook server in AWS EC2 instance

Viewed 230

I have installed Anaconda, Python 3 and Jupyter notebooks on an AWS EC2 instance.

Instance details:
Ubuntu 16.04, already set up a port for Jupyter notebook in the security group: Custom TCP Rule 8888 Anywhere
Python version: Python 3.6.5 :: Anaconda, Inc.
python-dateutil (2.8.1)

I created a Jupyter notebook config file:

c = get_config()
# Kernel config
c.IPKernelApp.pylab = 'inline' # if you want plotting support always in your notebook
# Notebook config
c.NotebookApp.certfile = u'/home/ubuntu/certs/mycert.pem' # location of your certificate file
c.NotebookApp.keyfile = u'/home/ubuntu/certs/mycert.key' # location of your certificate key
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False  # so that the ipython notebook does not open a browser by default
c.NotebookApp.password = u'sha1:68c136a5b064...' # the encrypted password you generated above

I also set my Tunnels in the Putty as port:8888 destination: localhost:8888.

However, when I type: $ jupyter notebook

It prompts out the following error:

Traceback (most recent call last):
File "/home/ubuntu/.local/bin/jupyter", line 7, in
from jupyter_core.command import main
File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyter_core/init.py", line 1, in
from .version import version_info, version
File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyter_core/version.py", line 21
suffix = f'.dev{version_info.serial}'
                                    ^
SyntaxError: invalid syntax
0 Answers
Related