Has virtualmin tested django 1.4 install script on CentOS 5?

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?

It sounds like you’re right, the Install Script for Django 1.4 may need to be updated to not allow it to be installed unless Python 2.5 is available.

Is there any chance you could file a bug report regarding that? You can do so using the “Support” link above.

Then, Jamie can work with you to determine the specifics there – most likely, he’d just prevent it from Installing it unless Python 2.5 is available… OTOH, he may know something we don’t about that :slight_smile:

Thanks!

-Eric