Skip to content

Instantly share code, notes, and snippets.

@laszlocsontos
Created July 17, 2020 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laszlocsontos/82a395aa3b59122296f7c18ce8a93170 to your computer and use it in GitHub Desktop.
Save laszlocsontos/82a395aa3b59122296f7c18ce8a93170 to your computer and use it in GitHub Desktop.
Initializes a virtual Python environment with Jupyter
#!/bin/bash
env_name="venv"
python3 -m venv ${env_name}
source ${env_name}/bin/activate
if [ ! -f requirements.txt ]; then
pip install numpy pandas matplotlib scipy scikit-learn jupyter jupyter-datatables
pip freeze > requirements.txt
else
pip install -r requirements.txt
fi
python -m ipykernel install --prefix ./${env_name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment