Python: ImportError happens on IDE suggestion
Question: **This is my packages structure:**

[![enter image description
here](http://i.stack.imgur.com/PHZaf.png)](http://i.stack.imgur.com/PHZaf.png)

**This is my __init.py__ inside settings package:**

    
    
    from settings import *
    

**This is my functions.py:**

    
    
    from git import *
    import initializer.settings as settings
    
    _repo_remote = "https://%s:%s@%s" % (settings.git_username, settings.git_password, git_info["remote"])
    

Although I imported the settings package with my IDE auto-complete, I keep
getting:

    
    
    ImportError: No module named initializer.settings
    

When changing my import to:

    
    
    import settings
    

The code works, but IDE is showing an error, why does it happen and what's
wrong? I assume it is something with the path it try to load the module from,
but I don't know how to change or control it..


Answer: If your `main.py` is in the `'initializer'` folder (it appears to be?), you
could import simply like this instead:

    
    
    import settings
    

As long as the `__init__.py` in the `'settings'` folder is like you described
it. You would need to have the `'main.py'` in the topmost folder to use it as
you had it.

