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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:18:17+00:00 2026-05-27T17:18:17+00:00

I seem to have similar problem as this guy: Django newbie deployment question –

  • 0

I seem to have similar problem as this guy: Django newbie deployment question – ImportError: Could not import settings 'settings' but i cant make heads or tails of it.
The server is running Debian. The app runs fine on internal server, however when trying to use apache + mod_python i get the following problem.

  File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 89, in __init__
    raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))

ImportError: Could not import settings 'treeio.settings' (Is it on sys.path?): No module named treeio.settings
  1. Project directory is /var/www/treeio
  2. All files have file permission 777 (i was testing if there were any permission problems)
  3. Content of httpd.conf

    <Location "/treeio/">
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE treeio.settings
        PythonOption django.root /treeio
        PythonDebug On
        PythonPath "['/var/www/treeio'] + sys.path"
    </Location>
    

More info:

echo $PYTHONPATH
:/var/www/treeio/..:/var/www/treeio

echo $DJANGO_SETTINGS_MODULE
treeio.settings

>>> import sys
>>> sys.path
['', '/usr/local/lib/python2.6/dist-packages/pip-1.0.2-py2.6.egg', '/var/www/treeio', '/var/www', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/pymodules/python2.6']

Help me stackoverflow, you’re my only hope!

  • 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-27T17:18:19+00:00Added an answer on May 27, 2026 at 5:18 pm

    Your main problem is that you’re using mod-python, despite clear warnings that it’s deprecated and shouldn’t be used for new projects.

    But if you really insist on using it, the problem is quite clear: you’re adding /var/www/trio to the path, so everything in trio needs to be referenced directly – settings, not trio.settings.

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

Sidebar

Related Questions

I seem to have the exact opposite problem than this question on stopping dock
I have a problem similar if not identical to the problem in this thread:
Similar questions to this one have been asked but none seem to address my
I seem to have a problem with this SQL query: SELECT * FROM appts
I have a similar problem as a previously solved problem of mine, except this
I seem to have exactly the same problem as this person: http://forums.adobe.com/thread/618752 He also
I actually seem to have problem with this (only on linux, described here with
This may not seem like a development question but there is a link. I
I'm having trouble finding an answer for this problem. Most similar posts lean seem
This is more of a design question that others may have had similar experience

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.