Last active
September 6, 2021 13:32
-
-
Save liufuyang/9391ee97747158d1bf04059a0d3126dd to your computer and use it in GitHub Desktop.
init_python3_ml_env.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
PYTHON_ENV_NAME=venv | |
pip3 install virtualenv | |
virtualenv -p python3 $PYTHON_ENV_NAME | |
echo "source $(pwd)/$PYTHON_ENV_NAME/bin/activate" > .env | |
source $(pwd)/$PYTHON_ENV_NAME/bin/activate # activate the local python environment | |
# pip install jupyter | |
# pip install scikit-learn | |
# pip install matplotlib | |
# pip install pandas | |
# pip install scipy | |
# pip install seaborn | |
# pip install graphviz | |
# python -m pip install pipx | |
# python -m pipx ensurepath | |
# # Install tox test runner, black code formatter, flake8 code format checker globally | |
# pipx install tox | |
# pipx install black | |
# pipx install flake8 | |
echo -e "\n" | |
echo "Please run \"$ source $PYTHON_ENV_NAME/bin/activate\" to switch to the python environment." | |
echo "Use \"$ deactivate\" anytime to deactivate the local python environment if you want to switch back to your default python." | |
echo "Or install autoenv as described on project readme file to make your life much easier." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment