我刚刚在Windows 7 Professional 64位上安装了全新的IPython笔记本。
我采取的步骤是:
> pip install ipython[notebook]
> pip install pywin numpy pygments nodeenv
我可以打开笔记本了。
但是,当我选择File > Print Preview
或File > Download as HTML
时,我收到500服务器错误。
堆栈跟踪是:
2014-08-07 09:44:25.431 [NotebookApp] Loaded template full.tpl
C:\Python34\lib\site-packages\IPython\nbconvert\filters\markdown.py:78: UserWarning: Node.js 0.9.12 or later wasn't found.
Nbconvert will try to use Pandoc instead.
"Nbconvert will try to use Pandoc instead.")
WARNING:tornado.general:500 GET /nbconvert/html/Users/Tom%20Oakley/Documents/IPython%20test.ipynb?download=false (::1): nbconvert failed: you need to have pywin32 installed for this to work
ERROR:tornado.access:{
"Dnt": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36",
"Referer": "http://localhost:8888/notebooks/Users/Tom%20Oakley/Documents/IPython%20test.ipynb",
"Host": "localhost:8888",
"Connection": "keep-alive",
"Accept-Language": "en-US,en;q=0.8,en-GB;q=0.6",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Encoding": "gzip,deflate,sdch"
}
ERROR:tornado.access:500 GET /nbconvert/html/Users/Tom%20Oakley/Documents/IPython%20test.ipynb?download=false (::1) 156.01ms referer=http://localhost:8888/notebooks/Users/Tom%20Oakley/Documents/IPython%20test.ipynb
WARNING:tornado.access:404 GET /favicon.ico (::1) 1.00ms referer=None
安装node.js和Pandocs没有帮助。
有关如何解决此错误的任何想法?
我和IPython团队raised it as an issue。
答案 0 :(得分:5)
这有效:
Command Prompt
。Run as administrator
。Yes
。ipython notebook
。基本上,由于某种原因,它必须以管理员身份运行。
答案 1 :(得分:1)
来自docs:nodeenv (node.js virtual environment) is a tool to create isolated node.js environments.
因此,在安装nodeenv之后,您需要创建新的node.js环境:https://github.com/ekalinin/nodeenv#basic
答案 2 :(得分:0)
我最终安装了Anaconda,结果很有效。
答案 3 :(得分:0)
这可能是同一错误消息的答案,但具体情况;
如果在ipython笔记本中执行时出现此错误消息,重新安装Anaconda3对我的情况没有帮助。
由于某些原因,您的Python安装可能没有安装nbconvert。 我建议您安装“pandoc'转换各种文件格式。它也可以在命令行模式下工作,也可以通过ipython notebook文件菜单工作。在Windows中安装pandoc的最简单方法,请访问以下网站;
http://www.texts.io/support/0004/
祝福, (债务人)<><