Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8340809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:16:55+00:00 2026-06-09T05:16:55+00:00

I am brand new to Python, and have been trying to get the Django

  • 0

I am brand new to Python, and have been trying to get the Django framework installed on my server. I can’t seem to find an answer or even a hint in the right direction anywhere online for this issue.

I have a VPS over at LiquidWeb and I am trying to install on that server. I’ve been following the Django installation guide over at: https://docs.djangoproject.com/en/1.4/topics/install/#installing-official-release

I am trying to install the stable release, not the development version, and have tried installing manually and via PIP – both are giving me the same error, listed below:

root@host [/]# sudo pip install Django

Downloading/unpacking Django

Downloading Django-1.4.1.tar.gz (7.7Mb): 7.7Mb downloaded

Running setup.py egg_info for package Django

Traceback (most recent call last):

  File "<string>", line 14, in ?

  File "/build/Django/setup.py", line 69, in ?

    version = __import__('django').get_version()

  File "django/__init__.py", line 15

    parts = 2 if version[2] == 0 else 3

               ^
SyntaxError: invalid syntax

Command python setup.py egg_info failed with error code 1 in /build/Django
Storing complete log in /root/.pip/pip.log

I am using Python 2.4.3 and trying to install Django 1.4.1.

Any help would be greatly appreciated, thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:16:58+00:00Added an answer on June 9, 2026 at 5:16 am

    Wait, you’re using Python 2.4?! Django 1.4 dropped support for 2.4. You’ll have to upgrade Python to get it to work. If you’re upgrading, you may as well use latest Python 2 version (2.7).

    The exact cause of the error is that the setup script uses the ternary conditional operator (true_expr if cond else false_expr), which I think was introduced in Python 2.5. While you could work around it by editing the script, similar things will probably be all over the Django codebase, so you would have to backport the entire framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am brand new to Python and have been working with it for a
I'm brand new at Python and I'm trying to write an extension to an
Brand new to the Log4Net library and there is something I have not been
I'm brand new to C++ and am having trouble trying to get a function
I'm brand new to Python and trying to learn it by replicating the following
I'm brand new to Google App Engine and have just been playing around with
I'm brand new to Prolog. I am simply trying to get some output from
Brand new to django. We have a legacy django project using django 0.96x that
I'm brand new with log4j and I can't seem to figure this out. If
I'm brand new to python, but I have a lot of experience with C++,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.