forked from donnemartin/dev-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pydata.sh
executable file
·107 lines (86 loc) · 3.05 KB
/
pydata.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
96
97
98
99
100
101
102
103
104
105
106
107
#!/usr/bin/env bash
# ~/pydata.sh
# Removed user's cached credentials
# This script might be run with .dots, which uses elevated privileges
sudo -K
echo "------------------------------"
echo "Setting up pip."
# Install pip
easy_install pip
###############################################################################
# Virtual Enviroments #
###############################################################################
echo "------------------------------"
echo "Setting up virtual environments."
# Install virtual environments globally
pip install virtualenv
pip install virtualenvwrapper
echo "------------------------------"
echo "Source virtualenvwrapper from ~/.extra"
EXTRA_PATH=~/.extra
echo $EXTRA_PATH
echo "" >> $EXTRA_PATH
echo "" >> $EXTRA_PATH
echo "# Source virtualenvwrapper, added by pydata.sh" >> $EXTRA_PATH
echo "export WORKON_HOME=~/.virtualenvs" >> $EXTRA_PATH
echo "source /usr/local/bin/virtualenvwrapper.sh" >> $EXTRA_PATH
echo "" >> $BASH_PROFILE_PATH
source $EXTRA_PATH
###############################################################################
# Python 2 Virtual Enviroment #
###############################################################################
echo "------------------------------"
echo "Setting up py2-data virtual environment."
# Create a Python2 data environment
mkvirtualenv py2-data
workon py2-data
# Install Python data modules
pip install numpy
pip install scipy
pip install matplotlib
pip install pandas
pip install sympy
pip install nose
pip install unittest2
pip install seaborn
pip install scikit-learn
pip install "ipython[all]"
pip install bokeh
pip install Flask
pip install sqlalchemy
pip install mysql-python
###############################################################################
# Python 3 Virtual Enviroment #
###############################################################################
echo "------------------------------"
echo "Setting up py3-data virtual environment."
# Create a Python3 data environment
mkvirtualenv --python=/usr/local/bin/python3 py3-data
workon py3-data
# Install Python data modules
pip install numpy
pip install scipy
pip install matplotlib
pip install pandas
pip install sympy
pip install nose
pip install unittest2
pip install seaborn
pip install scikit-learn
pip install "ipython[all]"
pip install bokeh
pip install Flask
pip install sqlalchemy
#pip install mysql-python # Python 2 only, use mysqlclient instead
pip install mysqlclient
###############################################################################
# Install IPython Profile
###############################################################################
echo "------------------------------"
echo "Installing IPython Notebook Default Profile"
# Add the IPython profile
cp -r init/profile_default/ ~/.ipython/profile_default
echo "------------------------------"
echo "Script completed."
echo "Usage: workon py2-data for Python2"
echo "Usage: workon py3-data for Python3"