Skip to content

Commit

Permalink
Merge pull request #16 from jhodrien/install-pip-pip3-tidy
Browse files Browse the repository at this point in the history
Tidy and work correctly with pip or pip3
  • Loading branch information
Nortamo authored Oct 12, 2023
2 parents f012e98 + bd11228 commit 2255b4d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,25 @@ if [[ ! -f "configs/$1.yaml" ]];then
exit 1
fi

if [[ $( which python3 &> /dev/null ) ]];then
if ! which python3 &> /dev/null;then
echo "Could not find python3"
exit 1
fi
if [[ $(which pip3 &> /dev/null ) ]];then
echo "Could not find pip3"
if which pip3 &> /dev/null;then
PIP=pip3
elif which pip &> /dev/null;then
PIP=pip
else
echo "Could not find pip3 or pip"
exit 1
fi
mkdir default_config
ln -s ../configs/$1.yaml default_config/config.yaml

mkdir -p default_config
ln -sf ../configs/$1.yaml default_config/config.yaml
echo "Using python3: $(which python3)"
unset PYTHONUSERBASE
export PYTHONUSERBASE=PyDeps
echo "export PY_EXE=$(which python3)" > frontends/inst_vars.sh
echo "Installing pyyaml"
pip3 install --user pyyaml
echo "Installing pyyaml with $PIP"
$PIP install --user pyyaml

0 comments on commit 2255b4d

Please sign in to comment.