Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot open jupyter notebook in VSCode

I recently switched to Visual Studio Code and would like to use Jupyter Notebooks. I have installed the ms-python extension, and also the jupyter package, as described here.

However, after reloading, I did not have a command Python: Create Blank New Jupyter Notebook, and if I open existing notebooks, the HTML/CSS is shown instead of an actual notebook view. I haven't found anything related to this problem online yet.

like image 338
erocoar Avatar asked Apr 01 '20 10:04

erocoar


People also ask

How do I open a Jupyter Notebook in VS Code?

If you have an existing Jupyter Notebook, you can open it by right-clicking on the file and opening with VS Code, or through the VS Code File Explorer.

Why my Jupyter Notebook is not opening?

Jupyter doesn't load or doesn't work in the browser Try in another browser (e.g. if you normally use Firefox, try with Chrome). This helps pin down where the problem is. Try disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter.

How do I enable Jupyter Notebook extensions in VS Code?

Installing the Jupyter Extension First, launch your VS Code and type “jupyter notebook” in the extension search box. Select the first result (Jupyter) and click on the Install button displayed in the middle of the screen: That's it! Once the installation is done, you already have Jupyter Notebook on your VS Code.


1 Answers

If Python extension is available, (if not install that extension) in VSCode, while the jupyter style file (cells beginning with # %%) is active:

  1. Press Ctrl+Shift+P
  2. Type: Export Current Python File as Jupyter Notebook
like image 200
Fuad Ak Avatar answered Oct 30 '22 19:10

Fuad Ak