ImportError: Could not import settings. No module named oscar. inslalling django-oscar on

Dont know how to get on with this project. Spent many hours looking for the answer.

ImportError: Could not import settings 'myproject.settings' (Is it on sys.path?): No module named oscar

I use Want to install django-oscar Im not so familiar with django

Its was my intention to create virtualenv /v/ and get django-oscar up and running in one of my projects. lets call it myproject

I started creating myproject with's 1-click installer now its installed in /home/myuser/myproject

I think I got the virtualenv correctly installed in dir /v/ , and I used pip install django-oscar and I think that all vent very well. I see a bunch of directories in the /v/lib/python2.6/site-packages

But I am not sure if I set PYTHONPATH correctly. I configured the /myproject/RUN file to

PYTHONPATH=/home/myuser/v/lib/python2.6/site-packages:/home/myuser/v/lib/python2.6/site-packages/django:/home/myuser/v/lib/python2.6/site-packages/oscar:/home/myuser/myproject:/home/myuser/myproject/myproject:. python runserver

I followed the setup of from this guide

edited /myproject/myproject/

And I edited the according to the guide.

I edited the /home/myuser/init/myproject file these lines


Havent got a clue what Im doing to be honest. I wish I understand more of all this.

Thank You for helping me

Here is what I get:

michaelh@s10:~$ cd myproject
michaelh@s10:~/myproject$ python syncdb
Traceback (most recent call last):
  File "", line 10, in <module>
  File "/usr/lib/pymodules/python2.6/django/core/management/", line 443, in execute_from_command_line
  File "/usr/lib/pymodules/python2.6/django/core/management/", line 382, in execute
  File "/usr/lib/pymodules/python2.6/django/core/management/", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/lib/pymodules/python2.6/django/core/management/", line 69, in load_command_class
    module = import_module('' % (app_name, name))
  File "/usr/lib/pymodules/python2.6/django/utils/", line 35, in import_module
  File "/usr/lib/pymodules/python2.6/django/core/management/commands/", line 8, in <module>
    from import custom_sql_for_model, emit_post_sync_signal
  File "/usr/lib/pymodules/python2.6/django/core/management/", line 6, in <module>
    from django.db import models
  File "/usr/lib/pymodules/python2.6/django/db/", line 11, in <module>
    if DEFAULT_DB_ALIAS not in settings.DATABASES:
  File "/usr/lib/pymodules/python2.6/django/utils/", line 184, in inner
  File "/usr/lib/pymodules/python2.6/django/conf/", line 42, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/pymodules/python2.6/django/conf/", line 95, in __init__
    raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'myproject.settings' (Is it on sys.path?): No module named oscar


I'm not sure what looks like but if you have a wsgi setup it should look something like this:

apache2/conf/httpd.conf This file has more but usually has most of it setup by your host, these areas you may have to adjust

WSGIDaemonProcess cpm processes=5 python-path=/home/myuser/myproject/:/home/myuser/myproject/myproject:/home/myuser/v/lib/python2.6/ threads=1

WSGIScriptAlias / /home/myuser/myproject/

import os
import sys
from django.core.handlers.wsgi import WSGIHandler

sys.stdout = sys.stderr

from site import addsitedir

from os.path import abspath, dirname, join
from django.conf import settings

os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
application = WSGIHandler()

If this isn't your setup I would at least try changing your python path to what I have in the httpd.conf file

Need Your Help

Cannot verify enterprise app using distributed provisioning profile in iOS 10

ios xcode ipad ios10

I upgraded iPad Air device to iOS10 and trying to trust the enterprise app by following the this process.