0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JupyterLabの実行環境を構築する

Posted at

機械学習のエッセンス 実装しながら学ぶPython、数学、アルゴリズム

この本を読むにあたり、macOS Mojave(10.14.6)にJupyterLabの環境をpipを使って構築したときのメモ。

HomebrewのPython3がインストールされていることが前提。バージョンは3.7.5。

$ python3 --version
Python 3.7.5

作業ディレクトリと仮想環境

作業ディレクトリとPythonの仮想環境を用意する。

mkdir /path/to/ml

cd /path/to/ml
python3 -m venv venv

pipの更新とモジュールのインストール

仮想環境上でpipを更新し、必要なモジュールをインストールする。

source ./venv/bin/activate

pip install --upgrade pip

pip install jupyterlab
pip install matplotlib

確認

JupyterLabを起動して確認する。

jupyter lab

インストール後の起動方法

作業ディレクトリに移動し、仮想環境をアクティベートしてコマンドを実行する。

cd /path/to/ml
source ./venv/bin/activate
jupyter lab
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?