1. Question.
Now there is a project, the old version is developed in Django 1.5, the new version is developed in Django version 1.7, the new and old versions need to be developed in parallel for some time in the near future. The question is how to install 1.5 and 1.7 versions of Django simultaneously under same one Linux OS, or how to deal with similar parallel requirements?
2. Answer 1.
You need to use Python virtualenv module to create two different Python virtual environment for develop in such case.
- Install python virtualenv module with pip.
pip install virtualenv
- Create the first python virtual environment for Django version 1.5 with below command. And deploy the old version project code on it.
virtualenv env1 pip install Django==1.5
- Create the second python virtual environment for Django version 1.7 to run. And deploy the new project version on it.
virtualenv env2 pip install Django==1.7
- After coding and debug, do not forget exit the virtual environment with
deactivate
command like below.deactivate