'VScode fails to export Jupyter notebook to HTML - 'jupyter-nbconvert` not found

I keep on getting error message:

Available subcommands: 1.0.0
Jupyter command `jupyter-nbconvert` not found.

I've tried to reinstall nbconvert using pip to no use. I've also tried the tip from this thread with installing pip install jupyter in vscode terminal but it shows that "Requirement already satisfied" VSCode fails to export jupyter notebook to html

I've also tried to manually edit jupyter settings.json file to the following:

"python.pythonPath": "C:\\Users\\XYZ\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\Scripts"

I've python 3.9 installed via windows store. Any tip on what might be the issue for vscode doesn't want to export the notebook?



Solution 1:[1]

Here's my step to convert .ipynb to html:

  1. Install required module: pip install nbconvert
  2. Turn to the folder that contains .ipynb then run jupyter nbconvert --to html Text.ipynb

You may create a new virtual environment to avoid messing up global one then try again.

For your reference: nbconvert-PyPI and create virtual environment.

enter image description here

Solution 2:[2]

  1. pip uninstall nbconvert

  2. run CMD as admin

  3. pip install nbconvert

Following above steps resolved my issue. Got this solution from this thread

Solution 3:[3]

Quick answer:

import pip
package= ['nbconvert'] # install any package you need without any error forever

for i in package:
    pip.main(['install', i])

Solution 4:[4]

I have found a better solution. To create multiple cron jobs with different filenames in the local download folder.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Molly Wang-MSFT
Solution 2 Chamod
Solution 3 myworldbox
Solution 4 Matt