Description of problem: jupyter-nbconvert uses Inkscape when converting an ipynb file to a pdf file. However, dnf does not install the inkscape package when installing the python3-notebook package. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. On a Fedora 32 installation without either inkscape or python3-nbconvert installed, install python3-nbconvert using dnf 2. Execute jupyter-nbconvert <file> --to pdf where file is an iypnb file that contains SVG content Actual results: The conversion fails because Inkscape cannot be executed Expected results: The conversion succeeds using Inkscape Additional info: Manually installing Inkscape does not make the conversion work, because the installed version of Inkscape does not know the CLI parameter "--without-gui" that jupyter-nbconvert tries to use.
> Manually installing Inkscape does not make the conversion work, because the installed version of Inkscape does not know the CLI parameter "--without-gui" that jupyter-nbconvert tries to use. This will be a problem. Could you please copy paste the errors as you get them?
(In reply to Miro Hrončok from comment #1) > > Manually installing Inkscape does not make the conversion work, because the installed version of Inkscape does not know the CLI parameter "--without-gui" that jupyter-nbconvert tries to use. > > This will be a problem. Could you please copy paste the errors as you get > them? Here is the full output: $ jupyter-nbconvert mynotebook.ipynb --to pdf [NbConvertApp] Converting notebook mynotebook.ipynb to pdf Unknown option --without-gui Traceback (most recent call last): File "/usr/bin/jupyter-nbconvert", line 11, in <module> load_entry_point('nbconvert==5.6.0', 'console_scripts', 'jupyter-nbconvert')() File "/usr/lib/python3.8/site-packages/jupyter_core/application.py", line 268, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 664, in launch_instance app.start() File "/usr/lib/python3.8/site-packages/nbconvert/nbconvertapp.py", line 340, in start self.convert_notebooks() File "/usr/lib/python3.8/site-packages/nbconvert/nbconvertapp.py", line 510, in convert_notebooks self.convert_single_notebook(notebook_filename) File "/usr/lib/python3.8/site-packages/nbconvert/nbconvertapp.py", line 481, in convert_single_notebook output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer) File "/usr/lib/python3.8/site-packages/nbconvert/nbconvertapp.py", line 410, in export_single_notebook output, resources = self.exporter.from_filename(notebook_filename, resources=resources) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 179, in from_filename return self.from_file(f, resources=resources, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 197, in from_file return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/pdf.py", line 170, in from_notebook_node latex, resources = super(PDFExporter, self).from_notebook_node( File "/usr/lib/python3.8/site-packages/nbconvert/exporters/latex.py", line 88, in from_notebook_node return super(LatexExporter, self).from_notebook_node(nb, resources, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 307, in from_notebook_node nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, **kw) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 139, in from_notebook_node nb_copy, resources = self._preprocess(nb_copy, resources) File "/usr/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 316, in _preprocess nbc, resc = preprocessor(nbc, resc) File "/usr/lib/python3.8/site-packages/nbconvert/preprocessors/base.py", line 47, in __call__ return self.preprocess(nb, resources) File "/usr/lib/python3.8/site-packages/nbconvert/preprocessors/base.py", line 69, in preprocess nb.cells[index], resources = self.preprocess_cell(cell, resources, index) File "/usr/lib/python3.8/site-packages/nbconvert/preprocessors/convertfigures.py", line 45, in preprocess_cell output.data[self.to_format] = self.convert_figure( File "/usr/lib/python3.8/site-packages/nbconvert/preprocessors/svg2pdf.py", line 102, in convert_figure raise TypeError("Inkscape svg to pdf conversion failed") TypeError: Inkscape svg to pdf conversion failed
https://src.fedoraproject.org/rpms/python-nbconvert/pull-request/7 https://src.fedoraproject.org/rpms/python-nbconvert/pull-request/8
There is a Fedora 32 scratchbuild at https://src.fedoraproject.org/rpms/python-nbconvert/pull-request/8 -> https://koji.fedoraproject.org/koji/taskinfo?taskID=44067966 -> https://kojipkgs.fedoraproject.org/work/tasks/7969/44067969/python3-nbconvert-5.6.0-4.fc32.noarch.rpm Could you please verify it fixes the problem? Alternatively, please attach the mynotebook.ipynb file here and I can test it myself.
Thank you very much for fixing this so fast. Conversion works for me with the rpm you provided. However, jupyter-nbconvert threw further errors that I could fix by installing the following packages: texlive-ulem texlive-titling texlive-adjustbox texlive-tcolorbox pandoc While the errors that appear when Inkscape or Pandoc are not installed are relatively straightforward to understand (it basically says "Pandoc not installed"), if I did not know LaTeX I would certainly not have been able to fix the tex-related errors. I already had a pretty long list of texlive packages installed, so I assume that even more of them are required for jupyter-nbconvert to work.
We might want to add recommends for those, but I don't want nbconvert to depend on tex.
FEDORA-2020-93c50e56a1 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-93c50e56a1
FEDORA-2020-93c50e56a1 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-93c50e56a1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-93c50e56a1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-93c50e56a1 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.