IPython笔记本不会读取配置文件 [英] IPython notebook won't read the configuration file

查看:137
本文介绍了IPython笔记本不会读取配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令初始化配置文件:

I used the following command to initialize a profile:

ipython profile create myserver

将这些行添加到〜/ .ipython / profile_myserver / ipython_notebook_config.py

c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.port = 8889

尝试使用以下方式启动笔记本:

Tried starting the notebook with:

ipython notebook --profile=myserver --debug

It根本不读取配置文件。
这是日志输出:

It does not read the config file at all. This is the log output:

[W 16:26:56.607 NotebookApp] Unrecognized alias: '--profile=myserver', it will probably have no effect.
[D 16:26:56.609 NotebookApp] Config changed:
[D 16:26:56.609 NotebookApp] {'profile': u'myserver', 'NotebookApp': {'log_level': 10}}
...
[I 16:26:56.665 NotebookApp] 0 active kernels 
[I 16:26:56.665 NotebookApp] The IPython Notebook is running at: http://localhost:8888/

由于我已明确指定端口8889并且仍然在8888上运行,因此它显然忽略了配置文件。我缺少什么?

Since I've explicitly specified port 8889 and it still runs on 8888, it clearly ignores the config file. What am I missing?

推荐答案

IPython现已转移到 版本4.0 ,这意味着如果你正在使用它,它将会读取它的配置来自〜/ .jupyter ,而非〜/ .ipython 。你必须创建一个新的配置文件

IPython has now moved to version 4.0, which means that if you are using it, it will be reading its configuration from ~/.jupyter, not ~/.ipython. You have to create a new configuration file with

jupyter notebook --generate-config

然后根据您的需要编辑生成的〜/ .jupyter / jupyter_notebook_config.py 文件。

and then edit the resulting ~/.jupyter/jupyter_notebook_config.py file according to your needs.

更多安装说明此处

这篇关于IPython笔记本不会读取配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆