0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCodeでKotlinのJupyter notebookを利用する

Posted at

概要

pythonでよく使われるjupyter notebookですが、実はKotlinでも使うことができるのでVSCodeで使う際の備忘録

用意するもの

  • VSCode
  • Python

今回はWindowsで作ることを想定しています

やり方

1. VSCodeに必要な拡張機能をインストール

  • Jupyter notebook
  • Python
  • Kotlin系の何か入れとくといいかも

2. pythonで仮想環境を作る

作業フォルダ内に仮想環境venvを作っておくと便利なので作っておきましょう
コマンドパレット(Ctrl+Shift+P)でcreate environment等うつとコマンドが出てきます
image.png
あとは指示通りにCondaとかVenvを選んだりPythonバージョンを選んだりしていくと作れます

3. pythonパッケージをインストールする

仮想環境を作ったのでActivateしておきます(調べると出てくるのでここでは割愛)
Activateできたら以下をインストールしていきましょう

pip install jupyter kotlin-jupyter-kernel

3. notebookを新規作成

コマンドパレット(Ctrl+Shift+P)でnew jupyter等で検索すれば新規作成が出来るので作成する

image.png

4. カーネルを選択

右上にselect Kernelとあるのでカーネルを選択する
image.png

出てこない場合はVSCodeを再起動すると出てくることが多いです

5. Let's Kotlin!!

image.png

補足

補完等がないので辛い

参考

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?