Latex 如何安装缺少的依赖项(adjustbox.sty)以将Ipython笔记本转换为pdf格式?
我有一个IPython笔记本,我正在尝试将其转换为PDF格式。但当我转到文件并以PDF格式下载时,会出现以下错误:Latex 如何安装缺少的依赖项(adjustbox.sty)以将Ipython笔记本转换为pdf格式?,latex,ipython-notebook,Latex,Ipython Notebook,我有一个IPython笔记本,我正在尝试将其转换为PDF格式。但当我转到文件并以PDF格式下载时,会出现以下错误: nbconvert failed: PDF creating failed 有什么想法吗?我认为有些依赖性似乎缺失了。你能告诉我如何在蟒蛇身上安装它们吗 编辑: 添加在我以pdf格式运行下载时打印到控制台的日志 [I 16:00:48.396 NotebookApp] Loaded template article.tplx [I 16:00:49.414 NotebookApp
nbconvert failed: PDF creating failed
有什么想法吗?我认为有些依赖性似乎缺失了。你能告诉我如何在蟒蛇身上安装它们吗
编辑:
添加在我以pdf格式运行下载时打印到控制台的日志
[I 16:00:48.396 NotebookApp] Loaded template article.tplx
[I 16:00:49.414 NotebookApp] Writing 51786 bytes to notebook.tex
[I 16:00:49.415 NotebookApp] Building PDF
[I 16:00:49.435 NotebookApp] Running pdflatex 3 times: [u'pdflatex', u'notebook.tex']
[C 16:00:49.853 NotebookApp] pdflatex failed: [u'pdflatex', u'notebook.tex']
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 21 languages loaded.
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/local/texlive/2014basic/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2014basic/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))
! LaTeX Error: File `adjustbox.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.19 \usepackage
{color} % Allow colors to be defined^^M
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on notebook.log.
[I 16:00:49.860 NotebookApp] Running bibtex 1 time: [u'bibtex', u'notebook']
[W 16:00:49.887 NotebookApp] bibtex had problems, most likely because there were no citations
[I 16:00:49.893 NotebookApp] Running pdflatex 3 times: [u'pdflatex', u'notebook.tex']
[C 16:00:49.923 NotebookApp] pdflatex failed: [u'pdflatex', u'notebook.tex']
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 21 languages loaded.
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2014basic/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/local/texlive/2014basic/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2014basic/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))
! LaTeX Error: File `adjustbox.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.19 \usepackage
{color} % Allow colors to be defined^^M
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on notebook.log.
[W 16:00:49.925 NotebookApp] 500 GET /nbconvert/pdf/A2_SpectralClustering.ipynb?download=true (::1): nbconvert failed: PDF creating failed
[E 16:00:49.950 NotebookApp] {
"Accept-Language": "en-us",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/6.2.3 Safari/537.85.12",
"Dnt": "1",
"Host": "localhost:8888",
"Referer": "http://localhost:8888/notebooks/A2_SpectralClustering.ipynb"
}
[E 16:00:49.950 NotebookApp] 500 GET /nbconvert/pdf/A2_SpectralClustering.ipynb?download=true (::1) 2096.70ms referer=http://localhost:8888/notebooks/A2_SpectralClustering.ipynb
[I 16:00:48.396 NotebookApp]加载的模板article.tplx
[I 16:00:49.414 NotebookApp]将51786字节写入notebook.tex
[I 16:00:49.415 NotebookApp]建筑PDF
[I 16:00:49.435 NotebookApp]运行pdflatex 3次:[u'pdflatex',u'notebook.tex']
[C 16:00:49.853 NotebookApp]pdflatex失败:[u'pdflatex',u'notebook.tex']
这是pdfTeX,版本3.14159265-2.6-1.40.15(TeX Live 2014)(预加载格式=pdflatex)
受限\已启用写18。
进入扩展模式
(./notebook.tex)
迟到的
加载21种语言的巴别塔和断字模式。
(/usr/local/texlive/2014basic/texmf dist/tex/latex/base/article.cls
文件类别:文章2007/10/19 v1.4h标准乳胶文件类别
(/usr/local/texlive/2014basic/texmf dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2014basic/texmf dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2014basic/texmf dist/tex/latex/pdftex def/pdftex.def
(/usr/local/texlive/2014basic/texmf dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2014basic/texmf dist/tex/generic/oberdiek/ltxcmds.sty)))
!LaTeX错误:找不到文件'adjustbox.sty'。
键入X退出或继续,
或输入新名称。(默认扩展名:sty)
输入文件名:
紧急停车。
l、 19\usepackage
{color}%允许定义颜色^M
!=>发生致命错误,未生成输出PDF文件!
记录在notebook.log上。
[I 16:00:49.860 NotebookApp]运行bibtex 1次:[u'bibtex',u'notebook']
[W 16:00:49.887 NotebookApp]bibtex出现问题,很可能是因为没有引用
[I 16:00:49.893 NotebookApp]运行pdflatex 3次:[u'pdflatex',u'notebook.tex']
[C 16:00:49.923 NotebookApp]pdflatex失败:[u'pdflatex',u'notebook.tex']
这是pdfTeX,版本3.14159265-2.6-1.40.15(TeX Live 2014)(预加载格式=pdflatex)
受限\已启用写18。
进入扩展模式
(./notebook.tex)
迟到的
加载21种语言的巴别塔和断字模式。
(/usr/local/texlive/2014basic/texmf dist/tex/latex/base/article.cls
文件类别:文章2007/10/19 v1.4h标准乳胶文件类别
(/usr/local/texlive/2014basic/texmf dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2014basic/texmf dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2014basic/texmf dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2014basic/texmf dist/tex/latex/pdftex def/pdftex.def
(/usr/local/texlive/2014basic/texmf dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2014basic/texmf dist/tex/generic/oberdiek/ltxcmds.sty)))
!LaTeX错误:找不到文件'adjustbox.sty'。
键入X退出或继续,
或输入新名称。(默认扩展名:sty)
输入文件名:
紧急停车。
l、 19\usepackage
{color}%允许定义颜色^M
!=>发生致命错误,未生成输出PDF文件!
记录在notebook.log上。
[W 16:00:49.925 NotebookApp]500 GET/nbconvert/pdf/A2_SpectralClustering.ipynb?下载=true(::1):nbconvert失败:pdf创建失败
[E 16:00:49.950记事本应用程序]{
“接受语言”:“en us”,
“接受编码”:“gzip,deflate”,
“连接”:“保持活动状态”,
“接受”:“text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8”,
“用户代理”:“Mozilla/5.0(Macintosh;英特尔Mac OS X 10_8_5)AppleWebKit/600.3.18(KHTML,如Gecko)版本/6.2.3 Safari/537.85.12”,
“Dnt”:“1”,
“主机”:“本地主机:8888”,
“推荐人”:http://localhost:8888/notebooks/A2_SpectralClustering.ipynb"
}
[E 16:00:49.950 NotebookApp]500 GET/nbconvert/pdf/A2_SpectralClustering.ipynb?下载=true(::1)2096.70ms参考=http://localhost:8888/notebooks/A2_SpectralClustering.ipynb
在Ubuntu14.04上,安装此软件包很有效:
sudo apt-get install texlive-latex-extra
在Fedora22上,我遇到了同样的问题。我必须安装“texlive adjustbox”软件包,然后一切都按预期工作
sudo dnf install texlive-adjustbox
您不需要使用anaconda来解决此问题,而是缺少一个较低级别的依赖项。我想指出,对于此问题和许多类似问题,一个快速解决方案是使用apt文件,例如
$apt-file search adjustbox.sty
输出指示包含此文件的软件包,然后您可以使用apt get安装它们。对于mac
$ sudo tlmgr install adjustbox
此外,您还需要安装:
$ sudo tlmgr install texlive-fonts-recommended
您可以编辑您的问题并将最近10条左右的消息添加到控制台吗?请检查编辑。感谢您的
latex
发行版缺少adjustbox.sty
。您的latex
发行版缺少一些软件包。您可以安装最新版本的tex live
或找到它的最新版本软件包管理器来安装丢失的软件包。你知道如何在Mac上安装吗?谢谢我不知道你在Mac上需要什么,但是如果你用谷歌搜索的话