Python virtual environment
go to directory ~/Documents/GitHub/excitability
setup
create a folder containing python interpreter for the virtual environment
virtualenv -p python env
activate virtual enviroment. once activated, the prompt will start with (env).
source env/bin/activate
verify whether the virtual environment is activated.
which python
Manage packages
install packages in the virtual environment, or python will search for the same package in other python interpreters in the computer.
pip install sphinx
pip freeze
Add virtual environment to jupyter notebook
install jupyter using brew. uninstall existing jupyter installed with pip.
brew install jupyter
install the kernel for this virtual environment.
python -m ipykernel install --user --name env
list installed kernels and remove unwanted kernels.
jupyter kernelspec list
jupyter kernelspec remove kernelname
list installed kernels and remove unwanted kernels.
jupyter kernelspec remove kernelname