安装IPython dev版本后,IPython notebook无法启动

4

我今天尝试安装IPython的开发版本,但运行命令"ipython notebook --pylab=inline"后,只出现一个空白笔记本页面(没有仪表板),命令行显示:

WARNING:tornado.access:404 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css (127.0.0.1) 0
2013-08-05 16:49:57.365 [tornado.access] WARNING | 404 GET /static/components/jquery/jquery.min.js (127.0.0.1
WARNING:tornado.access:404 GET /static/components/jquery/jquery.min.js (127.0.0.1) 0.00ms
2013-08-05 16:49:57.367 [tornado.access] WARNING | 404 GET /static/components/requirejs/require.js (127.0.0.1
WARNING:tornado.access:404 GET /static/components/requirejs/require.js (127.0.0.1) 0.00ms
2013-08-05 16:49:57.371 [tornado.access] WARNING | 404 GET /static/components/bootstrap/bootstrap/js/bootstra
WARNING:tornado.access:404 GET /static/components/bootstrap/bootstrap/js/bootstrap.min.js (127.0.0.1) 1.00ms
2013-08-05 16:49:57.372 [tornado.access] WARNING | 404 GET /static/components/jquery-ui/ui/minified/jquery-ui
WARNING:tornado.access:404 GET /static/components/jquery-ui/ui/minified/jquery-ui.min.js (127.0.0.1) 1.00ms

由于我按照ipython网站上的指导安装时遇到了问题,可能是这个原因。这是我做的事情:
1. 安装了Python。 2. 安装了disutils。 3. 安装了pip。 4. 安装了git(使用安装程序)。 5. 使用git克隆了ipython代码。 6. 安装了ipython。
我以为这就足够了。但当我尝试启动笔记本时,失败了,并告诉我找不到pyzmq。所以我安装了pyzmq。下一次启动仍然失败,这次是因为jinja2。所以我也安装了它。接下来我安装了tornado等等,直到我打开了笔记本。但当它打开时,发生了顶部提到的问题。
无法确定出了什么问题。需要帮助吗?

你是如何在第6步执行安装的?安装是否完成顺利?你有该安装过程的任何日志吗? - punchagan
很遗憾,没有日志记录,因为命令缓冲区太短了。我按照开发安装指南中提到的方法进行操作:“从git文件夹中创建的ipython目录中运行python setup.py install”。我在安装过程中没有看到任何错误,也许有一些警告。如果需要的话,我可以再次安装并查看错误信息。 - idoda
运行 git submodule init 然后跟着 git submodule update 再次安装是否有帮助?同时,这次要注意任何错误。 - punchagan
2个回答

4
依赖项可以这样安装:
pip install pyzmq jinja2 tornado

然而,更简单的安装方式是:
pip install .[notebook] # These brackets are literally there, not optional

关于静态文件的问题,我在编码时遇到了这个问题,因为有git子模块在主分支上。当前版本的pip 应该能够解决这些子模块。如果你的pip不能解决这个问题,在克隆后的ipython目录中运行以下命令:

git submodule init
git submodule update

现在安装IPython + IPython笔记本。
pip install .[notebook]

然而,您可以直接安装IPython 1.0的发行版候选版本:

pip install http://archive.ipython.org/testing/1.0.0/ipython-1.0.0-rc1.tar.gz#egg=ipython-1.0.0-rc1

不知道为什么你建议的内容不在IPython文档中。安装教程确实缺乏。 - idoda
@user1945306 - 你可以随时向IPython文档发起拉取请求来改进它们!我认为在接下来的一周内发布IPython 1.0版本后,安装最新和最棒的版本将会更加容易。 - Kyle Kelley

1

我写这篇答案只是为了更新并能够编写代码(有更好的方法吗?) 我按照您建议的“init,update”步骤进行了操作,并收到了以下信息:

C:\Program Files\Git\bin\ipython>pip install .
Unpacking c:\program files\git\bin\ipython
Running setup.py egg_info for package from file:///c%7C%5Cprogram%20files%5Cgit%5Cbin%5Cipython

no previously-included directories found matching 'IPython\deathrow'
no previously-included directories found matching 'IPython\html\static\mathjax'
warning: no files found matching 'IPython\.git_commit_info.ini'
warning: no previously-included files found matching 'docs\#*'
warning: no previously-included files found matching 'docs\man\*.1.gz'
no previously-included directories found matching 'docs\build'
no previously-included directories found matching 'docs\gh-pages'
no previously-included directories found matching 'docs\dist'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.flc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '.dircopy.log' found anywhere in distribution
Cleaning up...

所以没有成功..现在要尝试安装rc版本。


更新:安装RC版本成功。仍然不知道为什么上面的方法不起作用。 - idoda

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接