9

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.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Daremitsu
  • 545
  • 2
  • 8
  • 24
  • How did you import the ".ipynb" file in Jupyter Notebook in VSCode? Usually, we convert the ".ipynb" file into a ".py" file and then import it for use. – Jill Cheng Jan 04 '21 at 06:47

2 Answers2

9

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

conda install nbconvert or pip install nbconvert

Javi Carnero
  • 409
  • 4
  • 9
5

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.

Ian Huff
  • 2,699
  • 1
  • 17
  • 17