简体   繁体   English

IPython nbconvert语法错误?

[英]IPython nbconvert Syntax error?

I am attempting to simply export an IPython notebook to a PDF. 我试图将IPython笔记本简单导出为PDF。 I cannot get past a syntax error that makes no sense to me. 我无法克服对我来说毫无意义的语法错误。

ipython nbconvert "TestBook.ipynb" --to=latex --post=PDF
File "<ipython-input-45-98f03ab096ad>", line 1
ipython nbconvert "TestBook.ipynb" --to=latex --post=PDF
                ^
SyntaxError: invalid syntax

I'm new to python and IPython, but I'm at a complete loss here. 我是python和IPython的新手,但是我在这里完全不知所措。 Any ideas? 有任何想法吗?

Looks like you are trying to run this in the python shell 看起来您正在尝试在python shell中运行它

>>> ipython nbconvert "TestBook.ipynb" --to=latex --post=PDF
  File "<stdin>", line 1
    ipython nbconvert "TestBook.ipynb" --to=latex --post=PDF
                    ^
SyntaxError: invalid syntax
>>> 

Exit from the shell, and run it from the command line instead. 从外壳退出,然后从命令行运行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM