3 ms·
* https://virtualenvwrapper.readthedocs.io https://virtualenvwrapper.readthedocs.io also alias to create jupyter kernel for activated environment: mkkerne
by tandav 4y ago
* https://virtualenvwrapper.readthedocs.io https://virtualenvwrapper.readthedocs.io
also alias to create jupyter kernel for activated environment:
mkkernel() {
if [ -n "$1" ]; then
KERNEL_NAME=$1
elif [ -z "$VIRTUAL_ENV" ]; then
echo "Pass either kernel name as argument or activate virtualenv"
return 1
else [ -z "$1" ]
KERNEL_NAME="$(basename $VIRTUAL_ENV)"
echo "No kernel name provided, using name from virtualenv $KERNEL_NAME"
fi
pip install ipykernel
python -m ipykernel install --user --name=$KERNEL_NAME
}