user2379888
user2379888

Reputation: 1195

VS Code nbconvert and xetex

I'm on MacOS and I have VS Code installed along with a MacTex installation of texlive, and a conda installation of jupyter/nbconvert. I have the problem that while I have no problem converting jupyter notebooks to pdf at the command line (running jupyter nbconvert --to pdf mynotebook.ipynb), if I try to use the ... button in VS Code to get to Export, when it attempts to export to PDF, it struggles to find xetex:

OSError: xelatex not found on PATH, if you have not installed xelatex you may need to do so. Find further instructions at https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.

at bf.executeCommand (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-darwin-arm64/dist/extension.node.js:321:9552)
    at jT.export (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-darwin-arm64/dist/extension.node.js:322:412)
    at yb.performNbConvertExport (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-darwin-arm64/dist/extension.node.js:324:2500)
    at yb.performExport (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-darwin-arm64/dist/extension.node.js:324:2190)
    at yb.exportImpl (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-darwin-arm64/dist/extension.node.js:324:1798)
    at yb.export (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-darwin-arm64/dist/extension.node.js:324:1530)
    at f0.export (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-darwin-arm64/dist/extension.node.js:373:3134)
    at T0.h (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32837)
14:12:14.909 [error] If you have not installed xelatex (TeX), you will need to do so before you can export to PDF. For further instructions, please see https://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 browser's "Print to PDF" feature.

Without doing a whole new install of texlive, is there a way to get the nbconvert inside of VS Code to know where things are?

Upvotes: 0

Views: 101

Answers (0)

Related Questions