-
Notifications
You must be signed in to change notification settings - Fork 6
/
install_conda_pip.sh
27 lines (25 loc) · 1.14 KB
/
install_conda_pip.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
# the miniconda directory may exist if it has been restored from cache
if [ -d "$MINICONDA_DIR" ] && [ -e "$MINICONDA_DIR/bin/conda" ]; then
echo "Miniconda install already present from cache: $MINICONDA_DIR"
export PATH="$HOME/miniconda/bin:$PATH"
else # if it does not exist, we need to install miniconda
rm -rf "$MINICONDA_DIR" # remove the directory in case we have an empty cached directory
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
chmod +x miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a # for debugging
conda install numpy scipy matplotlib cython pytest pylint pep8 mpi4py astropy sphinx
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
fi
source activate test-environment
pip install -r requirements.txt