Use different Python version with virtualenv

NOTE: For Python 3.3+, see The Aelfinn’s answer below.


Use the --python (or short -p) option when creating a virtualenv instance to specify the Python executable you want to use, e.g.:

virtualenv --python="/usr/bin/python2.6" "/path/to/new/virtualenv/"

Leave a Comment