LoginSignup
0
1

More than 3 years have passed since last update.

Visual Studio Code & WSLでpython環境作ってみる

Posted at

動機

今まで直でWSLからpythonコードを実行してきたけど、window上でコード書く、ubuntuで実行っていうのがめんどくさくなってきたので(あと、vimが使えない人なので、、、)、vscodeで一本化してみた。

前提環境

  • windows 10 home
  • WSLはubuntu18.04.4 LTS (Bionic Beaver)
  • ubuntu上にはanacondaインストール済み

拡張機能

とりあえず、pythonの拡張機能を入れてみる。
image.png
インストールしたら再起動ボタンも押しておく。
image.png
こんな警告が。
image.png
anacondaの中のpythonを選択しておくと、警告が消えて実行できた。

Jupyter Notebokも試してみる

特に設定せずに、コマンドパレットで、

Python: Create Blank New Jupyter Notebook

で簡単にできた。
image.png

補足

WSL2がすでに出ているけど、まだ様子見。

参考

VS CodeでPythonするために必要なこと
Visual Studio CodeでJupyter Notebookを動かしてみた

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1