summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/lab-reconfiguration/create_venv.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/lab-reconfiguration/create_venv.sh b/utils/lab-reconfiguration/create_venv.sh
index 19d9b49c4..4e45f8462 100755
--- a/utils/lab-reconfiguration/create_venv.sh
+++ b/utils/lab-reconfiguration/create_venv.sh
@@ -7,11 +7,11 @@ BASEDIR=`dirname $0`
function venv_install() {
if command -v virtualenv-2.7; then
- virtualenv-2.7 $1
+ virtualenv-2.7 -p python2.7 $1
elif command -v virtualenv2; then
- virtualenv2 $1
+ virtualenv2 -p python2.7 $1
elif command -v virtualenv; then
- virtualenv $1
+ virtualenv -p python2.7 $1
else
echo Cannot find virtualenv command.
return 1
@@ -25,6 +25,11 @@ if [ ! -d "$BASEDIR/venv" ]; then
echo "Virtualenv created."
fi
+if [[ ! $(rpm -qa | grep python-2.7) ]]; then
+ echo "Python 2.7 not found, but required...attempting to install"
+ sudo yum install -y python-2.7*
+fi
+
if [ ! -f "$BASEDIR/venv/updated" -o $BASEDIR/requirements.pip -nt $BASEDIR/venv/updated ]; then
source $BASEDIR/venv/bin/activate
pip install -r $BASEDIR/requirements.pip