Skip to content

Commit

Permalink
Fix(?) conda/mamba installs
Browse files Browse the repository at this point in the history
  • Loading branch information
guyer committed Dec 4, 2023
1 parent bdaa4b8 commit efcc78b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .azure/templates/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,18 @@ steps:
- bash: |
conda config --set always_yes yes --set changeps1 no
conda config --remove channels defaults
if [[ ${{ parameters.python_version }} == "2.7" ]]; then
if [[ ${{ parameters.python_version }} != "2.7" ]]; then
# mamba doesn't work in Py2.7
conda create --quiet --name myEnvironment --channel conda-forge python=${{ parameters.python_version }}
else
# mamba needs to be installed in the Py3k environment for some reason
conda create --yes --quiet --name myEnvironment --channel conda-forge python=${{ parameters.python_version }} mamba
mamba install --quiet --channel conda-forge mamba
fi
displayName: Create Anaconda environment
- bash: |
if [[ ${{ parameters.python_version }} == "2.7" ]]; then
# mamba doesn't work in Py2.7
conda install --quiet --name myEnvironment --channel conda-forge python=${{ parameters.python_version }} ${{ parameters.conda_packages }}
conda create --yes --quiet --name myEnvironment --channel conda-forge python=${{ parameters.python_version }} ${{ parameters.conda_packages }}
else
# do mamba installs from environment on Py3k
source activate myEnvironment
mamba install --quiet --channel conda-forge python=${{ parameters.python_version }} ${{ parameters.conda_packages }}
mamba create --yes --quiet --name myEnvironment --channel conda-forge python=${{ parameters.python_version }} ${{ parameters.conda_packages }}
fi
displayName: Install Anaconda packages
Expand Down

0 comments on commit efcc78b

Please sign in to comment.