# Has virtualmin tested django 1.4 install script on CentOS 5?

**URL:** <https://forum.virtualmin.com/t/has-virtualmin-tested-django-1-4-install-script-on-centos-5/42522>\
**Category:** Virtualmin\
**Created:** [April 28, 2012, 8:21am UTC](https://forum.virtualmin.com/t/has-virtualmin-tested-django-1-4-install-script-on-centos-5/42522 "2012-04-28T08:21:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zlion](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/z/ecc23a/32.png) [@zlion](https://forum.virtualmin.com/u/zlion)\
**Post date:** [April 28, 2012, 8:21am UTC](https://forum.virtualmin.com/t/has-virtualmin-tested-django-1-4-install-script-on-centos-5/42522/1 "2012-04-28T08:21:24Z")

</div>

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](https://docs.djangoproject.com/en/dev/faq/install/)), 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](http://stackoverflow.com/questions/1465036/install-python-2-6-in-centos)).

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?

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [April 28, 2012, 9:01pm UTC](https://forum.virtualmin.com/t/has-virtualmin-tested-django-1-4-install-script-on-centos-5/42522/2 "2012-04-28T21:01:43Z")

</div>

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 🙂

Thanks!

-Eric

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 5:54am UTC](https://forum.virtualmin.com/t/has-virtualmin-tested-django-1-4-install-script-on-centos-5/42522/3 "2020-04-30T05:54:51Z")

</div>

Closed on April 30, 2020, 5:54am UTC


