gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 23:00:50 26 4
gpt4 key购买 nike

我正在尝试在 Terminal.com 上安装 Anaconda。我按照网站上的说明进行操作:
https://gist.github.com/iamatypeofwalrus/5183133

安装成功。我可以通过在终端输入 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

有人可以建议我做错了什么吗?
端口 8888 已打开(我授予了打开端口的权限。)

此外,为了检查 ipython 是否在服务器设置中工作,我创建了另一个实例(一个新的快照),完全按照第一行给出的 github 链接中给出的内容,我输入了以下内容:
$ ipython notebook --profile=nbserver

服务器启动了。但是当我尝试在浏览器上打开时出错。这是我在终端上看到的
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

谢谢,
唤醒

最佳答案

我在使用 Anaconda 发行版从 Ubuntu Server 获取 IPython/Jupyter 时遇到了类似的问题。我得到error: [Errno 99] Cannot assign requested address
我能够通过改变 trtm 的答案来解决这个问题。我的解决方案是在配置文件中指明服务器的 IP 地址。此配置文件的位置取决于您使用的 IPython 或 Jupyter Notebook 的版本。

文件名是 ipython_notebook_config.pyjupyter_notebook_config.py .该文件可能不存在。查找或创建它取决于版本,但编辑是相同的。

对于 IPython/Jupyter 版本 < 4.0
使用以下命令创建文件:

ipython profile create    

文件位置将是: ~/.ipython/profile_default/ipython_notebook_config.py
对于 Jupyter 版本 >= 4.0
使用以下命令创建配置文件:
jupyter notebook --generate-config    

文件位置将是: ~/.jupyter/jupyter_notebook_config.py
编辑文件 , 添加这一行。替换服务器设置为监听的任何 IP 地址。
c.NotebookApp.ip = '192.168.1.10'   

然后我可以通过将浏览器定向到 http://192.168.1.10:8888 来打开笔记本。

关于ipython - anaconda ipython 笔记本未在服务器设置中启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25366106/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com