-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallLINC_Linux.sh
executable file
·65 lines (57 loc) · 1.73 KB
/
installLINC_Linux.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
#!/usr/bin/env bash
INSTALL_DIR=$HOME/opt/
PYTHON_VERSION=Python-3.6.4
##EDIT ABOVE HERE#####################
PYTHON_PATH=$INSTALL_DIR$PYTHON_VERSION
export PATH=$PYTHON_PATH:$PATH
export PATH=$PYTHON_PATH/bin:$PATH
PYTHON=$PYTHON_PATH/python
echo --Script to install LINC on Linux--
echo Using python version: $(which python)
if [ ! $PYTHON -ef $(which python) ]; then
echo "$PYTHON_VERSION does not seem to be installed, please run the
installPython_Linux.sh script, manually install or change the
INSTALL_DIR path in this script to run python-3.6.4"
exit 1
fi
#upgrade pip install virtualenv
echo $(python -m pip install --upgrade pip);
echo $(python -m pip install virtualenv);
#If successful activate virtual env and install reqs
COMMAND="virtualenv --version";
if $COMMAND; then
echo "virtualenv command is present at version: $($COMMAND)"
echo $(which virtualenv)
else
echo "virtualenv did not get installed correctly please try the manual
install instructions"
exit 1
fi
START_VIR_ENV="source $PWD/env/bin/activate"
INSTALL_MOD="pip3 install -r $PWD/requirements.txt"
ACTIVATE_PYQT5="pyrcc5 -o libs/resources.py resources.qrc"
if [[ -d $PWD/env ]]; then
echo "Virtual environment has already been created...
to do a clean install delete the env/ directory
and run script again."
echo "Installing modules, it could take awhile."
$START_VIR_ENV \
&& echo $(which pip)\
&& pip list \
&& $INSTALL_MOD \
&& cd $PWD/labelImg-master/ \
&& $ACTIVATE_PYQT5 \
&& pip list
else
#create virtual env
echo "Creating new virtual environment...."
echo $(virtualenv env)
echo "Installing modules, it could take awhile."
$START_VIR_ENV \
&& pip list \
&& $INSTALL_MOD \
&& cd $PWD/labelImg-master/ \
&& $ACTIVATE_PYQT5 \
&& pip list
fi
exit 0