install.sh 338 Bytes
Newer Older
Alexandre Boyer's avatar
Alexandre Boyer committed
1
2
#!/bin/bash

3
4
cd "$(dirname "$0")"

Alexandre Boyer's avatar
Alexandre Boyer committed
5
6
7
8
9
10
11
env_dir="python_env"
path=`pwd`
path_to_env_dir="$path/$env_dir"

if [ -d $path_to_env_dir ];then
  . ./$env_dir/bin/activate
else
12
13
  sudo apt-get install python-dev -y
  
Alexandre Boyer's avatar
Alexandre Boyer committed
14
15
16
17
  virtualenv -p /usr/bin/python2 $env_dir
  . ./$env_dir/bin/activate
  python -m pip --no-cache-dir install -r requirements.txt
fi