Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 65040e3

Browse files
committed
Switch from pip3 to pipx for Jupyter install
1 parent 93c4fb3 commit 65040e3

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

jupyter-notebook/run.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ printf "$${BOLD}Installing jupyter-notebook!\n"
77
# check if jupyter-notebook is installed
88
if ! command -v jupyter-notebook > /dev/null 2>&1; then
99
# install jupyter-notebook
10-
# check if python3 pip is installed
11-
if ! command -v pip3 > /dev/null 2>&1; then
12-
echo "pip3 is not installed"
13-
echo "Please install pip3 in your Dockerfile/VM image before running this script"
10+
# check if pipx is installed
11+
if ! command -v pipx > /dev/null 2>&1; then
12+
echo "pipx is not installed"
13+
echo "Please install pipx in your Dockerfile/VM image before using this module"
1414
exit 1
1515
fi
16-
# install jupyter-notebook
17-
pip3 install --upgrade --no-cache-dir --no-warn-script-location jupyter
16+
# install jupyter notebook
17+
pipx install -q notebook
1818
echo "🥳 jupyter-notebook has been installed\n\n"
1919
else
2020
echo "🥳 jupyter-notebook is already installed\n\n"
2121
fi
2222

2323
echo "👷 Starting jupyter-notebook in background..."
2424
echo "check logs at ${LOG_PATH}"
25-
$HOME/.local/bin/jupyter notebook --NotebookApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 &
25+
$HOME/.local/bin/jupyter-notebook --NotebookApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 &

jupyterlab/run.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ printf "$${BOLD}Installing jupyterlab!\n"
77
# check if jupyterlab is installed
88
if ! command -v jupyterlab > /dev/null 2>&1; then
99
# install jupyterlab
10-
# check if python3 pip is installed
11-
if ! command -v pip3 > /dev/null 2>&1; then
12-
echo "pip3 is not installed"
13-
echo "Please install pip3 in your Dockerfile/VM image before running this script"
10+
# check if pipx is installed
11+
if ! command -v pipx > /dev/null 2>&1; then
12+
echo "pipx is not installed"
13+
echo "Please install pipx in your Dockerfile/VM image before running this script"
1414
exit 1
1515
fi
1616
# install jupyterlab
17-
pip3 install --upgrade --no-cache-dir --no-warn-script-location jupyterlab
17+
pipx install -q jupyterlab
1818
echo "🥳 jupyterlab has been installed\n\n"
1919
else
2020
echo "🥳 jupyterlab is already installed\n\n"
2121
fi
2222

2323
echo "👷 Starting jupyterlab in background..."
2424
echo "check logs at ${LOG_PATH}"
25-
$HOME/.local/bin/jupyter lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 &
25+
$HOME/.local/bin/jupyter-lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 &

0 commit comments

Comments
 (0)