Created
April 30, 2020 20:29
-
-
Save raeidsaqur/97a1ca434ca9f5c53f2c19298c81b953 to your computer and use it in GitHub Desktop.
Handling Conda Environments in Jupyter Notebook
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 | |
# Create virtual env in Conda | |
conda create -n aenv python=3.8 | |
conda activate aenv | |
# To [list|remove] | |
#conda env [list|remove] [-n aenv] | |
# Add Conda env to Jupyter Notebook | |
pip install --user ipykernel | |
# Add desired env to Jupyter kernel: | |
python -m ipykernel install --user --name=aenv | |
# Output -> Installed kernelspec myenv in /home/${whoami}/.local/share/jupyter/kernels/aenv | |
# List|Remove expired/unwanted env from Jupyer kernel: | |
jupyter kernelspec list # list all | |
jupyter kernelspec uninstall aenv # remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment