Skip to content

Instantly share code, notes, and snippets.

@rlan
Last active January 30, 2025 08:24
Show Gist options
  • Save rlan/fbd2afe4c0cb72cd6be0a9171fdc88ee to your computer and use it in GitHub Desktop.
Save rlan/fbd2afe4c0cb72cd6be0a9171fdc88ee to your computer and use it in GitHub Desktop.
Create a python virtual environment with Jupyter
#!/bin/bash -x
#
# Create a pyenv virtualenv with Jupyter
if [[ $# -eq 0 ]] ; then
echo 'Expect a python version: 3.12.8'
exit 1
fi
mkdir -p jupyter && \
cd jupyter && \
pyenv virtualenv $1 jupyter && \
pyenv activate jupyter && \
pip install -U pip && \
pip install ipywidgets jupyterlab pandas seaborn && \
echo jupyter > .python-version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment