Skip to content

Commit

Permalink
Use pip3 for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
kundan-git authored Sep 19, 2019
1 parent 5729226 commit 4e2e0ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install_os_prereq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ fi
# Prerequisite standard packages. If any of these are missing,
# script will attempt to install it. If installation fails, it will abort.
if [ "$PYTHON_VERSION" == "3" ]; then
PIP="pip3"
LINUX_PREREQ=('git' 'build-essential' 'python3-dev' 'python3-pip' 'nginx' 'postgresql' 'libpq-dev' )
else
PIP="pip"
LINUX_PREREQ=('git' 'build-essential' 'python-dev' 'python-pip' 'nginx' 'postgresql' 'libpq-dev')
fi
PYTHON_PREREQ=('virtualenv' 'supervisor')
Expand All @@ -52,7 +54,7 @@ for pkg in "${LINUX_PREREQ[@]}"
for ppkg in "${PYTHON_PREREQ[@]}"
do
echo "Installing Python package '$ppkg'..."
pip install $ppkg
$PIP install $ppkg
if [ $? -ne 0 ]; then
echo "Error installing python package '$ppkg'"
exit 1
Expand Down

0 comments on commit 4e2e0ad

Please sign in to comment.