Django 1.4 install script failed on CentOS 5.6. Here is the error message :
Now installing Django version 1.4 …
Django source install failed :
Traceback (most recent call last):
File “setup.py”, line 69, in ?
version = __import__('django').get_version()
File “/tmp/.webmin/481596_17549_2_script_install.cgi/Django-1.4/django/init.py”, line 15
parts = 2 if version[2] == 0 else 3
^
SyntaxError: invalid syntax
… failed! See the error message above for the reason why.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I guess the problem is python 2.4 and yum. Django 1.4 requires python 2.5 above(see FAQ: Installation | Django documentation | Django), while CentOS 5 shipped with 2.4, and can not and should not be upgraded because of yum dependency(see Install python 2.6 in CentOS - Stack Overflow).
I consider this as a design issue of this script:
-
Python version/environment of the virtual server owner (according to PYTHONPATH variable or ~/.bash_profile file) should be used, not the global/default python
-
Yum should not be used for solve python module dependencies, which will only install modules for global/default python
Again, does is really work on CentOS 5?