forked from codyfcook/nomics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_coding_environ.sh
62 lines (51 loc) · 1.72 KB
/
setup_coding_environ.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
# This is my personal setup. It does not mean it will work for you. This also might not run that nicely, I mostly use it to keep track of what I do rather than for fresh setups
# Install pyenv
brew install pyenv
brew install pyenv-virtualenv
brew install pyenv-virtualenvwrapper
brew install xz
brew install tcl-tk
# Change directory names if desired
mkdir ~/.ve
mkdir ~/workspace
echo 'export WORKON_HOME=~/.ve' >> ~/.bashrc
echo 'export PROJECT_HOME=~/workspace' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
# Update to latest python3
pyenv install 3.7.4
pyenv install 2.7.13
# Setup 4 virtual envs to use
pyenv virtualenv 3.7.4 jupyter3
pyenv virtualenv 2.7.13 ipython2
# Start with python 3 setup
pyenv activate jupyter3
pip install --upgrade pip
pip install jupyter # sometimes this won't install right
python -m ipykernel install --user
pyenv deactivate # may need to restart shell with exec $SHELL after this
# Now python 2
pyenv activate ipython2
pip install --upgrade pip
pip install ipykernel
python -m ipykernel install --user
pyenv deactivate
# Install python 3 packages
pyenv activate jupyter3
pip install -r requirements.txt
# jupyter extensions
pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
jupyter contrib nbextension install --user
pip install jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
pyenv deactivate
# install python 2 packages
pyenv activate ipython2
pip install -r requirements.txt
# pip install -e ~/Github/nomics
pyenv deactivate
# Make everything play nice
pyenv global 3.7.4 2.7.13 jupyter3 ipython2
# Will isntall dependences on start
echo 'pyenv virtualenvwrapper_lazy' >> ~/.bashrc
# Restart shell
exec $SHELL