Open drever opened 6 years ago
It should be calling shutil.which('pandoc')
- can you try that?
It uses ipython_genutils.py3compat.which
. Calling it from python directly works:
>>> from ipython_genutils.py3compat import which
>>> which('pandoc')
'/nix/store/g4fsbwfxm63nkip598mpni7q1anpj096-pandoc-1.19.2.1/bin/pandoc'
The python version is 3.6.2
and the nbconvert version is 5.2.1
. Thanks for looking into this!
Unfortunately, I have the same issue; Python 3.9.5, pandoc 3.1.11, nbconvert 7.16.0. @drever did you ever figure this out? I know NixOS is pretty niche so I'm not holding my breath for someone to pick this up.
@kfish610 sorry you're having trouble. Is this happening when running nbconvert
as its own process, or when using nbconvert
api in a Python process? Can you try running which pandoc
at the shell and then adding that to your PATH variable prior to running nbconvert? PATH
is what shutil.which
uses to try to locate an executable, so we just need to figure out how to get that straightened out.
When using nbconvert on NixOS it does not find pandoc. Pandoc is installed on the path:
However, the python script doesn't find pandoc for some reason (gist):
Calling
nbconvert.utils.pandoc
directly from python actually works.Does anyone have an idea? NixOS is pretty restrictive when it comes to the exposition of binaries. They are only visible in environments where they are explicitly imported.