-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·35 lines (28 loc) · 998 Bytes
/
install.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
#!/bin/bash
OLDDIR="`pwd`"
DIR="`dirname "$0"`"
cd "$DIR"
if [ -z "`command -v python3`" ]; then
echo "Error: Unable to run ''python3''. Exiting."
exit 1
fi
if [ ! -f ./bin/activate ]; then
echo "####################################"
echo "Creating Python Virtual Environment."
echo "####################################"
python3 -m venv .
fi
if [ "$VIRTUAL_ENV" != "`pwd`" ]; then
echo "######################################"
echo "Activating Python Virtual Environment."
echo "######################################"
source ./bin/activate
fi
echo "####################################################"
echo "Upgrade pip in the Virtual Environment if necessary."
echo "####################################################"
pip install --upgrade pip
echo "###################################################"
echo "Install required packages into Virtual Environment."
echo "###################################################"
pip install --requirement requirements.txt