From b6b9d18ee576db2ea0bf746c216f8e91edbbcd00 Mon Sep 17 00:00:00 2001 From: Steve Schmerler <git@elcorto.com> Date: Wed, 7 May 2025 17:03:48 +0200 Subject: [PATCH] gp: add venv + ipykernel notes --- BLcourse2.3/README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/BLcourse2.3/README.md b/BLcourse2.3/README.md index 21766d2..2887333 100644 --- a/BLcourse2.3/README.md +++ b/BLcourse2.3/README.md @@ -8,4 +8,19 @@ $ jupyter-notebook notebook.ipynb ``` For convenience the ipynb file is included. Please keep it in sync with the py -file using jupytext. +file using `jupytext` (see `convert-to-ipynb.sh`). + +One-time setup of venv and ipy kernel: + +```sh +# or +# $ python -m venv --system-site-packages bayes-ml-course-sys +# $ source ./bayes-ml-course-sys/bin/activate +$ mkvirtualenv --system-site-packages bayes-ml-course-sys +$ pip install -r requirements.txt + +# Install custom kernel, select that in Jupyter. --sys-prefix installs into the +# current venv, while --user would install into ~/.local/share/jupyter/kernels/ +$ python -m ipykernel install --name bayes-ml-course --sys-prefix +Installed kernelspec bayes-ml-course in /home/elcorto/.virtualenvs/bayes-ml-course-sys/share/jupyter/kernels/bayes-ml-course +``` -- GitLab