Bag of ML Words

ML = Machine Learning, Music Love, and Miscellaneous things in daily Livings

VS CodeでGUIなjuyputer notebook + WSL interpreter


が使えるよっていう。なんと、WSL2のターミナルからVSCodeを起動できる。そして、VSCodeがjupyter notebookをサポートしてる。

 

参考

aadojo.alterbooth.com

 

前提

 

VSCode: python plugin, remote development pluginをインストールしておく(普通してる)

WSL2: ubutu 18をいれてます。pipenvもいれておきます

 

WSL2上の作業

 

作業ディレクトリでpipenv環境を作ります

$ pipenv --python 3

あるいは

$ pipenv shell でもよさげ

jupyterと、ipykernelっていうのが必要になります

$ pipenv install jupyter ipykernel

 

終わったらvscodeをコール。

$ code .

 

VSCode側の作業

 

新規windowsがWSLにremoteでつないでpython interpreterを使える状態にあることを確認します。左下の部分が緑色に光ってWSL:ubutu-18.04ってなれば多分つながってる

 

Ctrl + shit + pでコマンド窓を立てて、jupyterとかするとjupyter notebookを新規作成みたいなのが補完されるので選択すると動きます、簡単だな。。。。

 

f:id:Dr_KayAi:20201103022925p:plain