Switch from pip3 to pipx for Jupyter install

pull/294/head
Muhammad Atif Ali 10 months ago
parent 93c4fb3a8d
commit 65040e3aba

@ -7,14 +7,14 @@ printf "$${BOLD}Installing jupyter-notebook!\n"
# check if jupyter-notebook is installed # check if jupyter-notebook is installed
if ! command -v jupyter-notebook > /dev/null 2>&1; then if ! command -v jupyter-notebook > /dev/null 2>&1; then
# install jupyter-notebook # install jupyter-notebook
# check if python3 pip is installed # check if pipx is installed
if ! command -v pip3 > /dev/null 2>&1; then if ! command -v pipx > /dev/null 2>&1; then
echo "pip3 is not installed" echo "pipx is not installed"
echo "Please install pip3 in your Dockerfile/VM image before running this script" echo "Please install pipx in your Dockerfile/VM image before using this module"
exit 1 exit 1
fi fi
# install jupyter-notebook # install jupyter notebook
pip3 install --upgrade --no-cache-dir --no-warn-script-location jupyter pipx install -q notebook
echo "🥳 jupyter-notebook has been installed\n\n" echo "🥳 jupyter-notebook has been installed\n\n"
else else
echo "🥳 jupyter-notebook is already installed\n\n" echo "🥳 jupyter-notebook is already installed\n\n"
@ -22,4 +22,4 @@ fi
echo "👷 Starting jupyter-notebook in background..." echo "👷 Starting jupyter-notebook in background..."
echo "check logs at ${LOG_PATH}" echo "check logs at ${LOG_PATH}"
$HOME/.local/bin/jupyter notebook --NotebookApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 & $HOME/.local/bin/jupyter-notebook --NotebookApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 &

@ -7,14 +7,14 @@ printf "$${BOLD}Installing jupyterlab!\n"
# check if jupyterlab is installed # check if jupyterlab is installed
if ! command -v jupyterlab > /dev/null 2>&1; then if ! command -v jupyterlab > /dev/null 2>&1; then
# install jupyterlab # install jupyterlab
# check if python3 pip is installed # check if pipx is installed
if ! command -v pip3 > /dev/null 2>&1; then if ! command -v pipx > /dev/null 2>&1; then
echo "pip3 is not installed" echo "pipx is not installed"
echo "Please install pip3 in your Dockerfile/VM image before running this script" echo "Please install pipx in your Dockerfile/VM image before running this script"
exit 1 exit 1
fi fi
# install jupyterlab # install jupyterlab
pip3 install --upgrade --no-cache-dir --no-warn-script-location jupyterlab pipx install -q jupyterlab
echo "🥳 jupyterlab has been installed\n\n" echo "🥳 jupyterlab has been installed\n\n"
else else
echo "🥳 jupyterlab is already installed\n\n" echo "🥳 jupyterlab is already installed\n\n"
@ -22,4 +22,4 @@ fi
echo "👷 Starting jupyterlab in background..." echo "👷 Starting jupyterlab in background..."
echo "check logs at ${LOG_PATH}" echo "check logs at ${LOG_PATH}"
$HOME/.local/bin/jupyter lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 & $HOME/.local/bin/jupyter-lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 &

Loading…
Cancel
Save