We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa2ac7f commit b71ddcaCopy full SHA for b71ddca
virtualenvwrapper.sh
@@ -45,9 +45,21 @@
45
#
46
47
# Locate the global Python where virtualenvwrapper is installed.
48
+# Use the highest Python version
49
if [ "${VIRTUALENVWRAPPER_PYTHON:-}" = "" ]
50
then
- VIRTUALENVWRAPPER_PYTHON="$(command \which python)"
51
+ for NAME in python3 python2 python
52
+ do
53
+ PYTHON="$(command \which $NAME 2>&1)"
54
+ if ! [ -z $PYTHON ]
55
+ then
56
+ if $PYTHON -m 'virtualenvwrapper.hook_loader' --help >/dev/null 2>&1
57
58
+ VIRTUALENVWRAPPER_PYTHON=$PYTHON
59
+ break
60
+ fi
61
62
+ done
63
fi
64
65
# Set the name of the virtualenv app to use.
0 commit comments