2
2

More than 3 years have passed since last update.

jupyterで仮想環境に入るならnb_conda_kernelsがおすすめ

Posted at

概要

タイトル通り。日本語で検索するとjupyter_environment_kernelsを使った方法ばかりがヒットするが、Anaconda公式が開発しているnb_conda_kernelsを使った方が簡単かつ確実。

導入

jupyterを起動する環境下で以下のコマンドを実行するだけ。

conda install -c conda-forge nb_conda_kernels

jupyterを開いて"カーネル"→"カーネルの変更"から好きな環境を選択する。

詳細

jupyter notebookやjuypter labを実行する際の環境をanacondaの仮想環境に変更したいという需要は非常に高いと思います。
日本語で「jupyter 仮想環境」と検索すると、jupyter_environment_kernelsを用いた方法を紹介している記事が多くヒットします。ですが、configの書き換えなどinstall以外にも操作が必要です。また、このレポジトリを見ると最終コミットが2018/2になっていることから、メンテナンス面でも不安が残ります。
そこで代替案として、nb_conda_kernelsをおすすめします。これはAnaconda公式が開発しているもので、installするだけでjupyter内での仮想環境を変更できるようになります。
configの書き換え等も不要のため、こちらの方が断然おすすめです。

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