Try running Jupyter with VS Code

It seems that Jupyter can be used with VS Code, so I tried it.

1. Environment

OS:Windows 10 VS Code:1.43.2 Extension: Anaconda Extension Pack 1.0.1 Python interpreter: 3.7.3 64-bit

2. Install the extension Jupyter

image.png

3. Enter the code

image.png

# %%
from matplotlib import pyplot as plt
import numpy as np

# %%
x = np.linspace(-10, 10, 100)
# %%
y = (x**3) + (5*x**2) + (2*x)
# %%
print(x)
#%%
print(y)
#%%
plt.plot(x, y)
plt.show() 
# %%
z = np.sin(x)
# %%
print(z)
# %%
plt.plot(x, z)
plt.show() 

4. Run the code

image.png image.png image.png image.png image.png image.png

5. Reference site

https://qiita.com/surei/items/9f25d7efa7c67d55d98f https://www.atmarkit.co.jp/ait/articles/1806/12/news041.html

Recommended Posts

Try running Jupyter with VS Code
Try running Python with Try Jupyter
Python with VS Code (Windows 10)
Try running CNN with ChainerRL
Debug Python with VS Code
Let's run jupyter natively supported by VS Code with python3.8
Try Fortran with VS Code up to debug settings. [Win10]
Using jupyter notobook with VS Code (mac OS) (personal memo)
Try running Jupyter Notebook on Mac
Build a Python environment with WSL + Pyenv + Jupyter + VS Code
Install python with mac vs code
How to build Python and Jupyter execution environment with VS Code
Build jupyter notebook environment with Visual Studio Code (VS Code) Mac version
Pass PYTHONPATH in 1 minute with VS Code
Display Japanese graphs with VS Code + matplotlib
VS Code Pylint is annoying with import! !! !! !!
VS Code settings
I made a tool to convert Jupyter py to ipynb with VS Code
Try running Pyston 0.1
Try running Google Chrome with Python and Selenium
I tried Flask with Remote-Containers of VS Code
Debug with VS Code using boost python numpy
Try using conda virtual environment with Jupyter Notebook
Use Python in Anaconda environment with VS Code
Use Docker development container conveniently with VS Code
Make your Python environment "easy" with VS Code
Build a python execution environment with VS Code
Python local development environment construction template [Flask / Django / Jupyter with Docker + VS Code]
Try running Amazon Timestream
Multiple selections with Jupyter
Try scraping with Python.
Strengthen with code test ⑦
Strengthen with code test ⑨
Strengthen with code test ③
[Unity (C #), Python] Try running Python code in Unity using IronPython
Allow real-time code checking in Python development with VS Code
Strengthen with code test ⑤
Strengthen with code test ④
Revive symbol search in Python workspace with VS Code
Strengthen with code test ②
Hamming code with numpy
Strengthen with code test ①
Try regression with TensorFlow
Enable intellisense for external libraries with Pipenv + VS Code
Remote debug Django environment created with docker-compose with VS Code
Use nim with Jupyter
Strengthen with code test ⑧
Strengthen with code test ⑨
Are you still using Jupyter Notebook? Enjoy a comfortable Python life with Jupyter Life (.py) with VS Code ?!
Try running python in a Django environment created with pipenv
Settings when developing App Engine / Python apps with VS Code
The story that Python stopped working with VS Code (Windows 10)
Comfortable LaTeX with Windows Subsystem for Linux and VS Code
Try clustering with a mixed Gaussian model on a Jupyter Notebook
Try HeloWorld in your own language (with How to & code)
Get country code with python
Try to factorial with recursion
Try function optimization with Optuna
Embed audio data with Jupyter
Try deep learning with TensorFlow
Try using PythonTex with Texpad.