jupyter notebook unable to download .tex or .pdf: nbconvert failed: Pandoc wasn't found...
See original GitHub issueHello!
I am new to jupyter notebook, python, and linux, and do not know much of anything about bash or start up files.
I am having the following error when I am trying to download a .tex or .pdf of my jupyter notebook .ipynb file.
500 : Internal Server Error
The error was:
nbconvert failed: Pandoc wasn't found.
Please check that pandoc is installed:
http://pandoc.org/installing.html
I am running jupyter notebook on linux. I downloaded and unzipped the pandoc file but got stuck there. I also added pandoc to my environmental file along with nbconverter. I also installed texlive but dont know what to do/if it worked.
I found this post on github where someone had the same issue and fixed it but I do not understand what it means to and how to set a path variable. I have a start up file but am scared to mess with it. Does the path variable need to be specific for jupyter notebook outputs?!?
Please help!
Thank you!
-m
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Hi there,
Thanks for your question. As a first note this is IPython, not jupyter notebook, the difference is complicated, so let’s gloss over it. That being said you might find more help in https://discourse.jupyter.org/, and on the github.com/jupyter/notebook.
Are you using conda ? If you are using conda than you should be able to “conda install pandoc”, it will be wayyyy easier.
This might be a bit long but bear with me.
When you type a command in bash, like “jupyter”, or “python” or “pandoc”, linux need to know where to “search” for things. What linux will do is search in the variable “$PATH”.
for example here is my PATH:
It will search in each of these folder in order, and stop on the first where it finds the command you asked.
To change “PATH” temporarily you can just in a bash prompt do
PATH=...
, but that tends to mess things up if you just “set” it.Oh no, i’ve messed up my path… but it’s ok, I can just close my terminal and reopen. What is better is to append, or prepend to path depending of wether you want things to have high (prepend), or low (append) precedence. if you are not sure append is always safer.
Note the lack of space around equal, and when you assign you use no
$
, but the "value of PATH` have a $.Once you have played allong enough and want to have
$PATH
always be the new value, you can edit your ~/.bashrc, or ~/.bash_profile or well it depends on your distribution and add a line withYou will even probably have in this file already some stuff, for example I have that added by conda :
You might need to restart your jupyter notebook server for things to work, but if PATH is set correctly, and in bash you get something along:
Then all is fine.
Side notes: if you are on linux you like can
apt install pandoc
(one almost never download and install a an app by downloading it manually on linux).If you wonder “where” a command like pandoc, jupyter, python is on linux, you can use
which
, to tell you where things are:This might help you to figure things out better, if not we can try to dig in more details.
This issue has not been resolved but it has been figured out. Jupyter is generating newer tex code than what the operating system CentOS-7 package installs of texlive (Based on TeX Live 2013) support. Thanks for all the help Carreau!