How to solve 'nbconvert failed: Inkscape svg to pdf conversion failed` in JupyterLab

Viewed 1672

I'm using the command %config InlineBackend.figure_format = 'svg' to have high quality image. Then I Export Notebook to PDF and encounter the error

enter image description here

  1. I install Inscape and added the line c.SVG2PDFPreprocessor.inkscape = 'C:\\Program Files\\Inkscape\\bin\\inkscape.exe' in the file jupyter_notebook_config.py as suggested here.

  2. I installed the nbconvert 6.0.0 as suggested here.

Sadly, both of them do not work. Could you please elaborate on how to solve this issue?

I use

  • Windows 10 Pro 2004 build 19041.572.

  • Anaconda3-2020.07

  • Inkscape 1.0.1.

1 Answers

I've found the solution for Windows 10.

  1. Install Inkscape in a path that contains no space. In my case, it's C:\Inkscape.

  2. Add the folder containing inkscape.exe into environment variable. In my case, this folder is C:\Inkscape\bin.

enter image description here

  1. Update nbconvert with command conda update nbconvert --yes. In my case, I instead update all the packages by conda update --all --yes.
Related