This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
install_superpack.sh
executable file
·96 lines (76 loc) · 2.44 KB
/
install_superpack.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
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
# set -euvx
cd "$(mktemp -d -t install_superpack)"
readonly BREW_PATH="/usr/local/bin"
readonly BREW="${BREW_PATH}/brew"
readonly GIT="${BREW_PATH}/git"
if ! [[ -x "${BREW}" ]]; then
if [[ "${BREW_PATH}" == /usr/local/bin ]]; then
# Installing Homebrew...
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo 'You are using a custom homebrew location and I could not find the brew binary.'
exit 1
fi
fi
if ! [[ -x /usr/bin/clang ]]; then
# No clang detected; Installing XCode Command Line Tools...
xcode-select --install
fi
export PATH="${BREW_PATH}:${PATH}"
# Ensure Homebrew formulae are updated
"${BREW}" update
if ! [[ -x "${GIT}" ]]; then
"${BREW}" install git
fi
# Add science tap
"${BREW}" tap homebrew/science
# Python tools and utilities
echo 'Would you like to use Python 2.7 or Python 3.5? (2/3)'
read -p '> ' PYVERSION
readonly PYVERSION
if [[ "${PYVERSION}" == "2" ]]; then
"${BREW}" install python
readonly PYTHON="${BREW_PATH}/python"
readonly EASY_INSTALL="${BREW_PATH}/easy_install"
readonly PIP="${BREW_PATH}/pip"
elif [[ "${PYVERSION}" == "3" ]]; then
"${BREW}" install python3
readonly PYTHON="${BREW_PATH}/python3"
readonly EASY_INSTALL="${BREW_PATH}/easy_install-3.5"
readonly PIP="${BREW_PATH}/pip3"
else
echo "Invalid selection. Quitting."
exit 1
fi
"${BREW}" install gcc
"${PIP}" install -U nose
"${PIP}" install -U six
"${PIP}" install -U pygments
"${PIP}" install -U sphinx
"${PIP}" install -U cython
# Jupyter
"${BREW}" install zeromq
"${PIP}" install -U jupyter
# Build from cloned repo to avoid SciPy build issue
"${GIT}" clone https://github.com/numpy/numpy.git numpy_temp
cd numpy_temp
"${PYTHON}" setupegg.py bdist_egg
"${EASY_INSTALL}" dist/*egg
cd ..
rm -rf numpy_temp
# SciPy
"${PIP}" install -U git+git://github.com/scipy/scipy
# Matplotlib
"${BREW}" install freetype
"${PIP}" install -U git+git://github.com/matplotlib/matplotlib.git
# Rest of the stack
"${PIP}" install -U git+git://github.com/pydata/pandas.git
"${PIP}" install -U git+git://github.com/scikit-learn/scikit-learn.git
"${PIP}" install -U git+git://github.com/pymc-devs/pymc.git
"${PIP}" install -U git+git://github.com/statsmodels/statsmodels.git
"${PIP}" install -U git+git://github.com/Theano/Theano.git
# Release version of Bokeh and Seaborn
"${PIP}" install -U bokeh seaborn
# Install patsy
"${PIP}" install -U patsy