I have a python development environment supporting Python 3.4.5. Right now, I would like to create a virtual environment using vritualenv. In this virtual environment, I need to support Python 2.7 instead since some of to-be-used Python programs only work for Python 2.7. How to create this virtual environment. Thanks.
1 Answer
If you already have Python 2.7 installed, then you can pass an argument to virtualenv to use a different Python version, like this:
virtualenv --python=python py27env
Note that is it practice that python points to python 2.x, whereas python3 points to python 3.x - if your system layout is different, adjust the command appropriately.
1 Comment
user288609
Hi Burhan, I posted a related question in another post, stackoverflow.com/questions/43334455/… which includes the information of my python development environment. Based on which, it seems that I do not have python 2.7, then how should I do?