Different projects require different setup of packages, especially in Python. One of the best practice is to do package requirement file by pip freeze | grep
.
Virtual Environment is also useful. Simply, virtualenv -p /usr/bin/python3 envname
. Then activate it by source envname/bin/activate
. Finish coding, remember to deactivate
.
To open the jupyter notebook in specific environment, please do,
ipython kernel install --user --name=envname
jupyter notebook
conda create -n my_env
conda activate my_env
conda env update -n my_env --file config.yaml
python -m ipykernel install --user --name=my_env
jupyter notebook
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
apt-get update
apt-get install python3-virtualenv
virtualenv -p /usr/bin/python3.6 venv
python3 -m venv my_env