#author("2026-11-20T02:38:19+00:00","default:honma","honma") #author("2026-11-20T05:44:09+00:00","default:honma","honma") * venvでPythonの仮想環境 [#x8124bac] Python 3.3 から標準機能になった venv を使えば、手順は簡単。 $ python3 -m venv <DIR> $ source <DIR>/bin/activate 実際に jupyter notebook をインストールする時はこんな感じ $ mkdir jupyter $ cd jupyter $ python3 -m venv .venv $ source .venv/bin/activate $ pip install jupyter numpy 起動 $ jupyter notebook 実に簡単にできる。 ** venvの導入 [#u2f589ad] 下記のように Python 3.3 より以前の場合は $ python3 --version Python 3.13.5 $ sudo apt install python3.13-venv でvenvを導入する。 ** 仮想環境(venv)をログイン時に有効化する [#jb6bed80] 仮想環境(venv)をログイン時に有効化したい場合はこんな感じ。~ ユーザー用ディレクトリに仮想環境を作成 $ python3 -m venv ~/.venvs/default ~/.bashrc の末尾に追記 $ echo 'source ~/.venvs/default/bin/activate' >> ~/.bashrc $ source ~/.bashrc ~ #htmlinsert(amazon_pc.html);