Creating Virtual Environments for Specific Python Versions with virtualenv
Problem: How do I specify the Python version for a virtual environment using virtualenv?
Answer:
Prior to Python 3.3, virtualenv users could specify the Python executable they wanted to use by employing the --python (or short -p) option during the creation of a virtualenv instance. For instance:
virtualenv --python="/usr/bin/python2.6" "/path/to/new/virtualenv/"
Note: For Python versions 3.3 and later, refer to the response provided by Aelfinn (included below for reference).
The above is the detailed content of How do I Specify the Python Version When Creating a Virtual Environment with virtualenv?. For more information, please follow other related articles on the PHP Chinese website!