I was trying to print a plotly plot in Visual Studio Code and caught this error: The code I used: I tried pip install nbformat in the console following this feed on GitHub and this question on stackoverflow but it did not work. However, it seems the code could run with the last 2 rows removed: Answer Method 1 reinstall