Skip to content

Commit 2255b4d

Browse files
authored
Merge pull request #16 from jhodrien/install-pip-pip3-tidy
Tidy and work correctly with pip or pip3
2 parents f012e98 + bd11228 commit 2255b4d

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

install.sh

100644100755
+12-7
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,25 @@ if [[ ! -f "configs/$1.yaml" ]];then
1111
exit 1
1212
fi
1313

14-
if [[ $( which python3 &> /dev/null ) ]];then
14+
if ! which python3 &> /dev/null;then
1515
echo "Could not find python3"
1616
exit 1
1717
fi
18-
if [[ $(which pip3 &> /dev/null ) ]];then
19-
echo "Could not find pip3"
18+
if which pip3 &> /dev/null;then
19+
PIP=pip3
20+
elif which pip &> /dev/null;then
21+
PIP=pip
22+
else
23+
echo "Could not find pip3 or pip"
2024
exit 1
2125
fi
22-
mkdir default_config
23-
ln -s ../configs/$1.yaml default_config/config.yaml
26+
27+
mkdir -p default_config
28+
ln -sf ../configs/$1.yaml default_config/config.yaml
2429
echo "Using python3: $(which python3)"
2530
unset PYTHONUSERBASE
2631
export PYTHONUSERBASE=PyDeps
2732
echo "export PY_EXE=$(which python3)" > frontends/inst_vars.sh
28-
echo "Installing pyyaml"
29-
pip3 install --user pyyaml
33+
echo "Installing pyyaml with $PIP"
34+
$PIP install --user pyyaml
3035

0 commit comments

Comments
 (0)