问题
I've just done a fresh install of IPython notebook on Windows 7 Professional 64 bit.
The steps I took were:
- Install Python 3.4.1 from http://python.org
> pip install ipython[notebook]
> pip install pywin numpy pygments nodeenv
I can open a notebook fine.
However, when I select File > Print Preview
or File > Download as HTML
I get a 500 server error.
The stack trace is:
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
Installing node.js and Pandocs did not help.
Any thoughts on how to fix this error?
I've raised it as an issue with the IPython team.
回答1:
This works:
- Right-click on the
Command Prompt
in the Start Menu. - Select
Run as administrator
. - Select
Yes
in the User Account Control dialog. - Run
ipython notebook
in the resulting Command Prompt window.
Basically, it has to be run as administrator for some reason.
回答2:
From docs: nodeenv (node.js virtual environment) is a tool to create isolated node.js environments.
So after installing nodeenv you need to create new node.js environment: https://github.com/ekalinin/nodeenv#basic
回答3:
I ended up installing Anaconda in the end and that worked.
回答4:
This may be an answer for the same error message, but a specific case;
If this error message showed up when executing in the ipython notebook, re-installing Anaconda3 did not help my case.
Your Python installation, some reasons, may not have installed nbconvert. I recommend that you install 'pandoc' that converts all kinds of file formats. It works in the command line mode and through ipython notebook file menu, as well. An easiest way to install pandoc in windows, visit the web site below;
http://www.texts.io/support/0004/
Blessings, (a debtor)<><
来源:https://stackoverflow.com/questions/25178602/500-server-error-using-ipython-notebook-on-windows