ipython - 转换 Ipython 笔记本时出错

标签 ipython

我在两个文件夹中有两个 ipynb 文件。一旦转换没问题,其他就不会转换了。难道我做错了什么?我正在转换为 html

文件1:

cd C:\Users\rcreedon\Dropbox\GIZSupervisor\DATA\Production_Data\STP_Data\Data_Sets\Wave1\1004
ipython nbconvert 1004ProdData.ipynb --to html

圆满成功

文件2:

cd C:\Users\rcreedon\Dropbox\GIZSupervisor\DATA\Production_Data\STP_Data\Data_Sets\Wave1\1006
ipython nbconvert 1006prodData.ipynb --to html

可怕的失败。

错误消息如下所示

C:\Users\rcreedon\Dropbox\GIZSupervisor\DATA\Production_Data\STP_Data\Data_Sets Wave1\1006>ipython nbconvert 1006ProdData.ipynb --to html [NbConvertApp] Using existing profile dir: u'C:\Users\rcreedon\.ipython\pro ile_default' [NbConvertApp] Converting notebook 1006ProdData.ipynb to html [NbConvertApp] Support files will be in 1006ProdData_files\ [NbConvertApp] Loaded template html_full.tpl [NbConvertApp] ERROR | Error while converting '1006ProdData.ipynb' Traceback (most recent call last): File "C:\Anaconda\lib\site-packages\IPython\nbconvert\nbconvertapp.py", line 00, in convert_notebooks output, resources = exporter.from_filename(notebook_filename, resources=res urces) File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters\exporter.py", line 289, in from_filename return self.from_notebook_node(nbformat.read(f, 'json'), resources=resource ,**kw) File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters\exporter.py", line 260, in from_notebook_node output = self.template.render(nb=nb_copy, resources=resources) File "C:\Anaconda\lib\site-packages\jinja2\environment.py", line 969, in rend r return self.environment.handle_exception(exc_info, True) File "C:\Anaconda\lib\site-packages\jinja2\environment.py", line 742, in hand e_exception reraise(exc_type, exc_value, tb) File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ tml_full.tpl", line 1, in top-level template code {%- extends 'html_basic.tpl' -%} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ tml_basic.tpl", line 1, in top-level template code {%- extends 'display_priority.tpl' -%} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ keleton\display_priority.tpl", line 1, in top-level template code {%- extends 'null.tpl' -%} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ keleton\null.tpl", line 26, in top-level template code {%- block body -%} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ tml_full.tpl", line 62, in block "body" {{ super() }} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ keleton\null.tpl", line 29, in block "body" {%- block any_cell scoped -%} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ keleton\null.tpl", line 76, in block "any_cell" {%- block headingcell scoped-%} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\exporters..\templates\ tml_basic.tpl", line 64, in block "headingcell" {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | strip_math_space | markdown2html | strip_files_prefix | add_anchor }} File "C:\Anaconda\lib\site-packages\IPython\nbconvert\filters\markdown.py", l ne 55, in markdown2html return pandoc(source, 'markdown', 'html', extra_args=['--mathjax']) File "C:\Anaconda\lib\site-packages\IPython\nbconvert\utils\pandoc.py", line 4, in pandoc "http://johnmacfarlane.net/pandoc/installing.html" PandocMissing: The command 'pandoc -f markdown -t html --mathjax' returned an e ror: [Error 2] The system cannot find the file specified. Please check that pandoc is installed: http://johnmacfarlane.net/pandoc/installing.html

最佳答案

不确定这是否仍然有效,但是通过将 cabal 二进制路径(例如 $HOME/.cabal/bin)添加到 bash 为我解决了一个非常类似的问题$PATH.

关于ipython - 转换 Ipython 笔记本时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19519008/

相关文章:

python - python 的哪个统计模块支持单向方差分析和事后测试(Tukey、Scheffe 或其他)?

python - 从第一行开始在pycharm控制台中执行多行输入

python - 线程化 IPython 笔记本的每单元格输出

python - 你如何将 bash 别名移植到 ipython > 0.10?

python - Matplotlib 文本不会以 xkcd 字体显示

python - 使用 IPython Notebook 获取输出

python - 尝试通过终端安装 ipython 时出现问题

python - 如何在 Scrapy Shell 中获取 Scrapy Response

python - LinAlg错误: SVD did not converge in matplotlib PCA

python - 更新 ipython 后出现问题 (%matplotlib nbagg)