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

  • Home
  • SEARCH
  • 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 7747737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:36:15+00:00 2026-06-01T10:36:15+00:00

I installed and configured a Django/MongoDB like this way ! pip install virtualenv source

  • 0

I installed and configured a Django/MongoDB like this way !

pip install virtualenv

source myproject/bin/activate

pip install hg+https://bitbucket.org/wkornewald/django-nonrel

pip install hg+https://bitbucket.org/wkornewald/djangotoolbox

pip install git+https://github.com/django-nonrel/mongodb-engine

All these operations are successful !

now , when I changed the settings.py file like this way :

DATABASES = {
    'default': {
        'ENGINE': 'django_mongodb_engine', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'mong_db',                      # Or path to database file if using sqlite3.
        'USER': '',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }

The mind-bending error occurs:

Error was: No module named django_mongodb_engine.base

Obviously the django_mongodb_engine successful installed. but why this error will appear?

btw,Forgive my poor English !

  • 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-01T10:36:16+00:00Added an answer on June 1, 2026 at 10:36 am

    I went through the same steps you did, then opened a Python shell:

    $ python
    >>> import django_mongodb_engine.base
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Users/emptysquare/.virtualenvs/foo/lib/python2.7/site-packages/django_mongodb_engine/base.py", line 4, in <module>
        from django.db.backends.signals import connection_created
      File "/Users/emptysquare/.virtualenvs/foo/lib/python2.7/site-packages/django/db/__init__.py", line 14, in <module>
        if not settings.DATABASES:
      File "/Users/emptysquare/.virtualenvs/foo/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__
        self._setup()
      File "/Users/emptysquare/.virtualenvs/foo/lib/python2.7/site-packages/django/conf/__init__.py", line 40, in _setup
        raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
    ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
    

    But if I do:

    $ DJANGO_SETTINGS_MODULE=settings python
    >>> import django_mongodb_engine.base
    

    … it works.

    Can you set DJANGO_SETTINGS_MODULE and try importing django_mongodb_engine.base in the Python shell?

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

Sidebar

Related Questions

OS X, Python 2.7, a fresh virtualenv: virtualenv bar source bar/bin/activate pip install django
I have my server configured like this (this is on a fresh install of
I'm writing a Django application that is using pip & virtualenv to manage its
What is the best available EC2 AMI configured with Django Stack MySql Installed and
I just installed and configured Celery with RabbitMQ for a Django project and I
I just installed MOSS 2007 SP2 and configured my site. When I go to
Is there a way to configure a binary to be installed as SUID using
I'm install apache server and php on Windows 7 and configured its. But when
I have installed/configured Elmah on my personal SharePoint dev environment and everything works great
I have installed and configured SharePoint 2010 to run on the same box as

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.