diff --git a/setup/setup-ci/install-pip-package.sh b/setup/setup-ci/install-pip-package.sh index d417ad7e2c3..ced2f8ceb34 100644 --- a/setup/setup-ci/install-pip-package.sh +++ b/setup/setup-ci/install-pip-package.sh @@ -8,6 +8,7 @@ sudo -u azureuser -i <<'EOF' PACKAGE=numpy ENVIRONMENT=azureml_py38 +source /anaconda/etc/profile.d/conda.sh conda activate "$ENVIRONMENT" pip install "$PACKAGE" conda deactivate diff --git a/setup/setup-ci/setup-custom-conda-env.sh b/setup/setup-ci/setup-custom-conda-env.sh index e7a0059e33c..204d0799c73 100644 --- a/setup/setup-ci/setup-custom-conda-env.sh +++ b/setup/setup-ci/setup-custom-conda-env.sh @@ -4,12 +4,14 @@ set -e # This script creates a custom conda environment and kernel based on a sample yml file. +source /anaconda/etc/profile.d/conda.sh conda env create -f env.yml echo "Activating new conda environment" conda activate envname conda install -y ipykernel -echo "Installing kernel" sudo -u azureuser -i <<'EOF' +echo "Installing kernel" +source /anaconda/etc/profile.d/conda.sh conda activate envname python -m ipykernel install --user --name envname --display-name "mykernel" echo "Conda environment setup successfully."