Miniconda installation

  |   Source

Below is a bash script to install Miniconda and set up a root environment containing all the libraries that I routinely use and that are necessary to replicate the examples given in this blog.

 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
# DOWNLOAD AND INSTALLS THE MINICONDA Python distribution
# and a suite of Scientific Python packages
# Nicolas Fauchereau <Nicolas.Fauchereau@niwa.co.nz>
# 13/08/2015
# ==============================================================================

# download the minimal anaconda distribution (! uncomment the line
# corresponding to your platform [linux or mac])
#wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
#wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh

# make the installer executable
chmod +x miniconda.sh

# set the installation directory, by default your HOME directory
INSTALL_DIR=${HOME}

# run the installer
./miniconda.sh -b -p ${INSTALL_DIR}/miniconda

# add this line in the end of your .bashrc (linux) or .bash_profile (mac)
export PATH=${INSTALL_DIR}/miniconda/bin:${PATH}

# update conda (the package and environment manager) to the latest version
${INSTALL_DIR}/miniconda/bin/conda update --yes conda

# install the required packages into
# $INSTALL_DIR/miniconda/lib/python3.4/site-packages
# NOTE: this package list might be expanded in the future, so I might
# want to read if off a "requirements.txt" file ...

packages=("ipython-notebook"
"numpy"
"scipy"
"pandas"
"matplotlib"
"basemap"
"netcdf4"
"xray"
"seaborn"
"scikit-learn"
"statsmodels"
"odo"
"dask"
"pyproj"
"gdal"
"fiona"
"shapely"
"rasterio"
)

for item in ${packages[*]}
do
    echo "=====================================================================";
    echo "installing ${item}";
    ${INSTALL_DIR}/miniconda/bin/conda install --yes ${item};
done

# install pip     
${INSTALL_DIR}/miniconda/bin/conda install --yes pip;

# install palettable
${INSTALL_DIR}/miniconda/bin/pip install palettable --proxy http://proxy_url:port
Comments powered by Disqus
    Share