Home > Enterprise >  Facing problem in Exporting a ipynb file to pdf in VS Code
Facing problem in Exporting a ipynb file to pdf in VS Code

Time:08-24

I have fulfilled all the requirements for exporting a jupyter notebook (ipynb) to pdf in VScode but still, it gives me the same error of installing TeX, Although

I have MiKTex installed in my system I have Installed TeX package I have Pandoc installed in my system.

When I installed MiKTeX and TeX it was not working but when I installed Pandoc it just worked once but now it giving me the same error.

This is how I have installed the dependencies:

  • I have installed nbconvert through this command pip install nbconvert.

  • For TeX pip install tex

  • For pandoc i downloaded an .exe file from their website and installed it in my system, besides this I also installed pandoc package through this command in terminal pip install pandoc

However I still have an error:

error 13:11:2.772: If you have not installed xelatex (TeX) you will need to do so before you can export to PDF, for further instructions please look nbconvert.readthedocs.io/en/latest/install.html#installing-tex. To avoid installing xelatex (TeX) you might want to try exporting to HTML and using your browsers "Print to PDF" feature.

Kindly Help me in this regard TIA.

CodePudding user response:

The installation of MiKTeX and TeX depends on the operating system.

If you are using Linux try executing the following code inside the terminal of your environment:

apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic

If you are using Windows you should get the MiKTeX exe here and install it following the wizard. The installation is really simple (just follow the wizard), but if you need to, you can check out the official instructions.

Also refer to this link for full instructions to install the additional packages that may be needed by nbconvert.

CodePudding user response:

Open the jupyter file with Chrome and convert it to PDF by printing. This way is simpler and more effective.

  • Related