anaconda ipython笔记本未在服务器设置中启动

anaconda ipython笔记本未在服务器设置中启动,ipython,ipython-notebook,anaconda,Ipython,Ipython Notebook,Anaconda,我正在尝试在Terminal.com上安装Anaconda。我遵循了现场的指示: 安装成功。我可以通过在终端键入ipython登录到python。但是当我进来的时候 $ipython笔记本 我在终端上收到了以下错误消息 [I 10:35:24.760 NotebookApp] Using existing profile dir: u'/root/.ipython/profile_default' [I 10:35:24.872 NotebookApp] Using MathJax from

我正在尝试在Terminal.com上安装Anaconda。我遵循了现场的指示:

安装成功。我可以通过在终端键入ipython登录到python。但是当我进来的时候 $ipython笔记本

我在终端上收到了以下错误消息

[I 10:35:24.760 NotebookApp] Using existing profile dir: u'/root/.ipython/profile_default'
[I 10:35:24.872 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest
/MathJax.js
[I 10:35:24.891 NotebookApp] The port 8888 is already in use, trying another random port.
Traceback (most recent call last):
  File "/root/anaconda/bin/ipython", line 6, in <module>
    sys.exit(start_ipython())
  File "/opt/ipython/IPython/__init__.py", line 120, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/opt/ipython/IPython/config/application.py", line 548, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/ipython/IPython/terminal/ipapp.py", line 322, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/ipython/IPython/core/application.py", line 378, in initialize
    self.parse_command_line(argv)
  File "/opt/ipython/IPython/terminal/ipapp.py", line 317, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/ipython/IPython/config/application.py", line 460, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/ipython/IPython/config/application.py", line 398, in initialize_subcommand
    self.subapp.initialize(argv)
  File "<string>", line 2, in initialize
  File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/ipython/IPython/html/notebookapp.py", line 829, in initialize
    self.init_webapp()
   File "/opt/ipython/IPython/html/notebookapp.py", line 718, in init_webapp
    self.http_server.listen(port, self.ip)
  File "/root/.local/lib/python2.7/site-packages/tornado/tcpserver.py", line 125, in listen
    sockets = bind_sockets(port, address=address)
  File "/root/.local/lib/python2.7/site-packages/tornado/netutil.py", line 137, in bind_soc
kets
    sock.bind(sockaddr)
  File "/root/anaconda/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 99] Cannot assign requested address

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True  
2014-08-18 10:50:54.605 [NotebookApp] Using existing profile dir: u'/root/.ipython/profile_nbserver'
2014-08-18 10:50:54.612 [NotebookApp] Using MathJax from CDN: https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js
2014-08-18 10:50:54.631 [NotebookApp] Serving notebooks from local directory: /root/.ipython/profile_nbserver
2014-08-18 10:50:54.631 [NotebookApp] 0 active kernels
2014-08-18 10:50:54.631 [NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:1111/
2014-08-18 10:50:54.631 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
WARNING:tornado.general:SSL Error on 7 ('10.0.218.170', 55369): [Errno 1] _ssl.c:510: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
当我试图打开本地系统时,我在浏览器上看到:

502 Bad Gateway

openresty/1.5.11.1
谢谢,
唤醒

运行
ipython profile create
创建配置文件(如果您尚未创建)

从配置文件文件夹中打开
ipython\u notebook\u config.py
文件,编辑/取消注释笔记本服务器将侦听的IP地址

c、 NotebookApp.ip='127.0.0.1'


我在使用Anaconda发行版让IPython/Jupyter在Ubuntu服务器上工作时遇到了类似的问题。我正在得到
错误:[Errno 99]无法分配请求的地址

我可以通过修改trtm的答案来解决这个问题。我的解决方案是在配置文件中指明服务器的IP地址。此配置文件的位置取决于您使用的IPython或Jupyter笔记本的版本

文件名为
ipython\u notebook\u config.py
jupyter\u notebook\u config.py
。此文件可能不存在。查找或创建它取决于版本,但编辑是相同的

适用于IPython/Jupyter版本<4.0
使用以下内容创建文件:

ipython profile create    
jupyter notebook --generate-config    
文件位置将为:
~/.ipython/profile\u default/ipython\u notebook\u config.py

适用于Jupyter版本>=4.0
使用以下命令创建配置文件:

ipython profile create    
jupyter notebook --generate-config    
文件位置将为:
~/.jupyter/jupyter\u notebook\u config.py

要编辑文件,请添加此行。替换服务器设置为侦听的任何ip地址

c.NotebookApp.ip = '192.168.1.10'   

然后,我可以通过将浏览器指向
http://192.168.1.10:8888

在配置文件中,添加

c.NotebookApp.ip='*'
而不是

c.NotebookApp.ip='your server ip'

这对我来说很有效。

这个问题开始出现在我的Docked jupyter笔记本上。解决方法是使用
--ip=
启动笔记本,我通过使用
ctrl+p+q
弹出docker容器,然后使用
docker容器检查查找ip来获得。这会将大量信息与
IPAddress
字段一起转储。复制后,使用
exec
命令将其转到容器,并使用下面提到的命令启动笔记本

然后,要启动笔记本,命令变成:
jupyter notebook--ip=--allow root