GAE, Python 2.5, Python 2.6 Side-by-side on windows
On my development system, I have Python 2.6, Django 1.1 and GAE.
- I have three projects running on Python 2.6 and Django 1.1.
- I have 1 project using GAE, Python 2.6 and Django 1.1.
I have heard that my set-up for running GAE using Python 2.6 may create some head-scratching problems while deploying it on the production server, because GAE supports only Python 2.5, and using 2.6 is not recommended.
Can I develop GAE application using Python 2.6? If not, what should I do? I am using Windows Vista as my development system.
Please note : I don't want to disturb my 开发者_C百科other projects in development, which uses Python 2.6 and Django 1.1.
Use virtualenv to isolate your development environments, so you can have one running 2.5 and the others running 2.6.
Edited to add: once 2.5 is installed, you can initialize your virtualenv to use it with the -p option:
virtualenv -p /path/to/python2.5/python.exe destination_dir
Unless you are using python 2.6 specific syntax/code your application is safe to run on GAE.
Re virtualenv question above: virtualenv have a parameter
--python=PYTHON_EXE
that you can point to the interpreter you'd like
it to use. Running virtualenv
without parameters or with an --help
option whill show you which options you may pass it.
精彩评论