Daremitsu
Daremitsu

Reputation: 643

Error: Importing notebooks requires Jupyter nbconvert to be installed

I am trying to import an ipynb file in a Jupyter Notebook in VS Code. However I am getting the following error everytime:

Error 2021-01-02 00:31:20: Export failed [Error: Importing notebooks requires Jupyter nbconvert to be installed.
at u.getExportInterpreter (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:32:546101)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async _.export (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:251215)
at async c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:428354
at async u.waitWithStatus (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:805850)
at async E.importNotebook (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:428274)
at async E.listenForErrors (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:423814)]

I have also used pip to install nbconvert in VS Code and also have restarted VS Code. The problem is persisting.

Upvotes: 9

Views: 15510

Answers (3)

I had a similar problem. I'm running mine on WSL, but regardless of installing it on WSL through CLI, and in the environment, and from the notebook level, it was still throwing that error. Looks like a problem with encoding. In the context of dataspell (as this is the IDE where I experienced this problem):

File->Settings->Project: -> Python Interpreter -> + -> nbconvert

Upvotes: 0

Ian Huff
Ian Huff

Reputation: 3077

If you run the "Jupyter: Select interpreter to start Jupyter server" command in vscode you should see an interpreter listed. Try making sure that nbconvert is installed into that interpreter / environment. That location should be the fallback location for import and export commands so if nbconvert is there your commands should all work.

Upvotes: 5

Javi Carnero
Javi Carnero

Reputation: 467

On windows, installing it on the default python and restarting vscode fixed the issue.

conda install nbconvert or pip install nbconvert

Upvotes: 10

Related Questions