anaconda3安装好了
但是jupyter不能启动
报错:
==:~/anaconda3/bin$ ./jupyter-notebook
Traceback (most recent call last):
File "./jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/home/=/anaconda3/lib/python3.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/=/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "</home/=/anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-7>", line 2, in initialize
File "/home/=/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/home/=/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1630, in initialize
self.init_webapp()
File "/home/=/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1407, in init_webapp
self.http_server.listen(port, self.ip)
File "/home/=/anaconda3/lib/python3.7/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/home/=/anaconda3/lib/python3.7/site-packages/tornado/netutil.py", line 174, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address
查了网上,说是host地址不对。https://www.jianshu.com/p/381c2a3c529d
改了,重启机器,还是不行。报错。
然后改了/home/=/anaconda3/lib/python3.7/site-packages/tornado/netutil.py,
line 174, in bind_sockets
sock.bind(sockaddr)
打印一下sockaddr;
发现是:
('127.0.0.1', 8888)
('::1', 8888, 0, 0)
哦,知道了,应该是ipv6不行。
修改vi /etc/hosts
删除ipv6相关的配置。
再试,可以了。
vim ~/.jupyter/jupyter_notebook_config.py
修改 c.NotebookApp.allow_remote_access = True 允许外网访问
如果没有这个文件,执行 jupyter notebook --generate-config
记得把阿里云机器的8888端口打开