I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtualenv with a different version of Python?
I compiled Python 2.6.2 and would like to use it with some virtualenv. Is it enough to overwrite the binary file? Or do I have to change something in respect to the libraries?
Just use the --python
(or short -p
) option when creating your virtualenv instance to specify the Python executable you want to use, e.g.:
virtualenv --python=/usr/bin/python2.6 <path/to/new/virtualenv/>
N.B. For Python 3.3 or later, refer to The Aelfinn's answer below.
这篇关于使用不同的 Python 版本和 virtualenv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!