Convert ipynb to pdf in Jupyter

As said by Thomas K in the comments, you need to have Latex installed, and after add the path to the directory containing pdflatex.exe file to the PATH variable of your system.

I have looked for a lightweight distribution and tried installing TeXworks, but I didn’t find any pdflatex.exe file.
So I have tried TeX Live, which worked fine creating the pdflatex.exe file under the target installation directory. This path should be like C:\...\texlive\2016\bin\win32.
Finally, you should just add this path to the PATH environment variable of your system (you can use the link shared by Thomas K).

As said here, you need to quit jupyter notebook and open a new command prompt after making any path changes, in order for jupyter to find the newly added item to the PATH.

Then, in Jupyter, you can check your environment variables by running the following (refer to this link for details):

    import os
    os.environ['PATH'].split(';')

and check if it contains the path to pdflatex.exe file.

If you get some trouble when exporting your notebook to pdf due to missing files/packages (this happened to me), refer to this link to search and install them under TeX Live.

Leave a Comment