LoginSignup
0
2

More than 1 year has passed since last update.

Jupyter NotebookでAnaconda仮想環境を利用

Last updated at Posted at 2022-09-27

概要

Jupyter NotebookでAnaconda仮想環境を利用する。

仮想環境の作成

Anaconda仮想環境を作成する。

conda create -n 仮想環境名

作成した仮想環境に移動。

conda activate 仮想環境名

仮想環境の追加

ipykernelのインストール

pip install ipykernel

Jupyter Notebookに仮想環境を追加

ipython kernel install --user --name=仮想環境名

仮想環境の利用

Jupyter Notebook上で、新規ファイル作成時に選択
スクリーンショット (3).png
もしくは、ファイル内でKernel → Change kernelで仮想環境の変更
スクリーンショット (5).png

仮想環境の削除

Jupyter Notebook上から仮想環境を削除

jupyter kernelspec uninstall 仮想環境名

さらに、仮想環境自体を削除したい場合は

conda remove -n 仮想環境名 --all

で削除。

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