-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup_env.sh
executable file
·34 lines (25 loc) · 1.17 KB
/
setup_env.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
#!/bin/bash
VENV=smtoolsenv
PYVER=3.5
DEPARRAY=(numpy scipy matplotlib obspy beautifulsoup4 rasterio pandas shapely h5py gdal pytest pytest pytest-cov pytest-mpl cartopy basemap)
#turn off whatever other virtual environment user might be in
source deactivate
#remove any previous virtual environments called smtools
CWD=`pwd`
cd $HOME;
conda remove --name $VENV --all -y
cd $CWD
#create a new virtual environment called $VENV with the below list of dependencies installed into it
conda create --name $VENV --yes --channel conda-forge python=$PYVER ${DEPARRAY[*]} -y
#activate the new environment
source activate $VENV
#install some items separately
#conda install -y sqlalchemy #at the time of this writing, this is v1.0, and I want v1.1
conda install -y psutil
#do pip installs of those things that are not available via conda.
pip install git+git://github.com/kallstadt-usgs/seisk.git
pip install git+git://github.com/usgs/neicio.git
pip install git+git://github.com/usgs/neicmap.git
pip -v install https://github.com/usgs/MapIO/archive/master.zip
#tell the user they have to activate this environment
echo "Type 'source activate ${VENV}' to use this new virtual environment."