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 7174027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:56:51+00:00 2026-05-28T15:56:51+00:00

I am hosting my Django application on Dreamhost. Dreamhost serves Django-1.2.1 on Python-2.5.2, but

  • 0

I am hosting my Django application on Dreamhost. Dreamhost serves Django-1.2.1 on Python-2.5.2, but I use Django-1.3.1 on Python-2.7.2, for my app.
before making any changes to meet my requirements, the passenger_wsgi.py contained the following:

import sys, os
sys.path.append(os.getcwd())
sys.path.insert(1, '/home/username/example.com/projects')
os.environ['DJANGO_SETTINGS_MODULE'] = "projectname.settings"
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

the app runs but with some missing modules because of the old version of Django.

So I installed python-2.7.2 on /home/username/opt/Python-2.7.2, and then installed Django-1.3.1 on it using pip tool.

and made some changes to passenger_wsgi.py to make the app run on python-2.7.2. and became like this:

import sys, os

# makes sure the interpreter executable is python2.7
INTERP = os.path.join(os.environ['HOME'], 'opt', 'Python-2.7.2', 'bin', 'python2.7')
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)

sys.path.append(os.getcwd())
sys.path.insert(1, '/home/username/example.com/projects')
os.environ['DJANGO_SETTINGS_MODULE'] = "projectname.settings"
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

when I try to run the code again, the following error rises

An error occurred importing your passenger_wsgi.py

can anyone help??

  • 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-05-28T15:56:52+00:00Added an answer on May 28, 2026 at 3:56 pm

    I figured out the problem. I just hadn’t installed mysql-python module, that caused the project to crash on running when it reaches the part related to database configuration in the setting.py file

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

Sidebar

Related Questions

Currently I am hosting a Django app I developed myself for my clients, but
I'd like to go into Django with Python, but it seems that some hosting
I'm in the middle of putting up my first django application on shared hosting.
I'm running a django app through fcgi on my school's shared hosting system. Everything
I have a Django app hosting on Heroku. In the app, the users create
I am trying to set up django shared hosting at iPage.com using FastCGI but
I'm working on a Django app for hosting media (specifically audio and images). I
Background : Am using Django. Am hosting my site on Dreamhost. Am using Nginx
The host I'm considering for hosting a Django site has mod_python installed, but does
I have installed django-cms in my hosting. But there is a problem. That's when

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.