Python 3.7 pdflatex filenotfounderror
我在Windows 10上使用Pycharm 3.7使用Python 3.7。我有一个Tex文件,并且想生成一个带有PDFLATEX的PDF。
pdfl = PDFLaTeX.from_texfile('test.tex')
pdf, log, completed_process = pdfl.create_pdf(keep_pdf_file=True, keep_log_file=True)
我不断收到以下错误:filenotfounderror:[errno 2]没有这样的文件或目录:'c:\ users \ myusername \ appdata \ local \ local \ temp \ tmps48h0jgi \ file.pdf' 该程序试图在我的用户文件夹中的temp文件夹中找到某个file.pdf。 (Texlive和Texstudio也已安装并工作。)
我做错了什么?
谢谢。
I am using python 3.7 with PyCharm on Windows 10. I have a Tex file and want to generate a pdf with pdflatex.
pdfl = PDFLaTeX.from_texfile('test.tex')
pdf, log, completed_process = pdfl.create_pdf(keep_pdf_file=True, keep_log_file=True)
I keep receiving the following error: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\myusername\AppData\Local\Temp\tmps48h0jgi\file.pdf'
The program tries to find a certain file.pdf in my user folder in a temp folder.
(Texlive and TexStudio is also installed and working.)
What am I doing wrong?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也遇到了这个错误,对我而言,上述解决方案不起作用。这是一个对我有用的解决方案:
虽然Debuggin我发现互动_mode是PDFLATEX的意外参数。因此,它无法创建file.pdf文件,然后无法找到它。当相互作用_mode不是时,未给出参数,并且解决了错误。
I had this error too and for me the above solution didn't work. Here is a solution that works for me:
While debuggin I found that the interaction_mode was an unexpected argument for pdflatex. It therefore failed to create the file.pdf file and was then unable to find it. When interaction_mode is None the argument is not given and the error is resolved.
只需指定.tex文件的位置即可。
Just specify where your .tex file is located.