Skip to content

Instantly share code, notes, and snippets.

@thanakijwanavit
Last active February 8, 2021 23:06
Show Gist options
  • Save thanakijwanavit/2960714687f38ae81bd7d0623b6b1545 to your computer and use it in GitHub Desktop.
Save thanakijwanavit/2960714687f38ae81bd7d0623b6b1545 to your computer and use it in GitHub Desktop.
sagemaker python38
name="python38"
version="3.8"
# Create a new conda environment for the given Python version
conda create -y -n "$name" python="$version"
# Activate the environment
source /home/ec2-user/anaconda3/bin/activate "$name"
# Create a Jupyter kernel for your new environment
pip install ipykernel
python -m ipykernel install --name "$name" --display-name "$name" --user
# Deactivate the environment
source /home/ec2-user/anaconda3/bin/deactivate
## credit https://donagh.io/using-custom-python-versions-with-sagemaker/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment