在 Windows 上使用 IPython 笔记本时出现 500 服务器错误

在 Windows 上使用 IPython 笔记本时出现 500 服务器错误

我刚刚在 64 位 Windows 7 Professional 上全新安装了 IPython 笔记本。

我采取的步骤如下:

  1. 从 python.org 安装 Python 3.4.1
  2. pip 安装 ipython[notebook]

  3. pip 安装 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

我以为那nodeenv是 node.js

关于如何修复此错误您有什么想法吗?

答案1

这有效:

  1. Command Prompt在“开始”菜单中右键单击。
  2. 选择Run as administrator
  3. Yes在用户帐户控制对话框中选择。
  4. ipython notebook在出现的命令提示符窗口中运行。

基本上,由于某种原因,它必须以管理员身份运行。

相关内容