Reputation: 5893
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.
Upvotes: 11
Views: 49287
Reputation: 21
I had this same issue and found no answers online to solve it. What I've tried: 1- re-load Vs Code; 2- choose Python interpreter on Command Pallet (Ctrl + Shift + P); 3- Create New Blanck Notebook on Command Pallet (Ctrl + Shift + P); The editor would change to a notebook cell with Code and Markdown options if step 3 worked properly. 4- open your notebook (File > Open or Ctrl+Shift+E - if it is already part of your workspace).
Then I was able to run cells.
I believe it's not necessarily a Python Extension bug. But ended up giving up for now, because new little issues were showing up. I prefer using the python editor with #%%
to create cells and run in Interactive Python.
Upvotes: 0
Reputation: 877
Here is a good explanation: https://code.visualstudio.com/docs/python/data-science-tutorial
I fixed by setting enviroment and workspace using terminal and this tutorial. Do not afraid if your purpose isn't data science, anyway knowledge are useful.
Upvotes: 0
Reputation: 158
If Python extension is available, (if not install that extension) in VSCode, while the jupyter style file (cells beginning with # %%) is active:
Upvotes: 2
Reputation: 831
I understand that the Jupyter extension is not maintained. I just use the python extension now. I received this info from the vscode notification in the bottom right corner.
Upvotes: 0
Reputation: 16
An easy way to fix this should be to save the file with an .ipynb
ending, vs-code should then automatically start the notebook extension. You can also make sure that you activated a Python environment, then Python: Create New Blank Jupyter Notebook
should appear.
An alternative I would recommend is editing notebooks following this guide in the vs-code documentation
Upvotes: 0