You could use relative imports (python >= 2.5):
from ... import nib
(What’s New in Python 2.5) PEP 328: Absolute and Relative Imports
EDIT: added another dot ‘.’ to go up two packages
More Related Contents:
- How to import a Python class that is in a directory above?
- How can I safely create a nested directory?
- How do I unload (reload) a Python module?
- How do I get the path of the current executed file in Python?
- `from … import` vs `import .` [duplicate]
- Why is Python running my module when I import it, and how do I stop it?
- Python pip install module is not found. How to link python to pip location?
- How to config nltk data directory from code?
- Callable modules
- List all the modules that are part of a python package?
- Importing modules: __main__ vs import as module
- ModuleNotFoundError: What does it mean __main__ is not a package?
- Why use sys.path.append(path) instead of sys.path.insert(1, path)?
- Import from sibling directory
- Import a python module without running it
- Python not recognising directories os.path.isdir() [duplicate]
- Python: import module from another directory at the same level in project hierarchy
- Python: Why should ‘from import *’ be prohibited?
- Import module works in terminal but not in IDLE
- What is __path__ useful for?
- How can I safely create a directory (possibly including intermediate directories)?
- Where are the python modules stored?
- Python: is the current directory automatically included in path?
- Can you define aliases for imported modules in Python?
- Import paths – the right way?
- How can I extract the folder path from file path in Python?
- How to properly use relative or absolute imports in Python modules?
- How do I create a directory, and any missing parent directories?
- How to reference python package when filename contains a period
- Python modules with identical names (i.e., reusing standard module names in packages)