Take a look at the Packages documentation (Section 6.4).
In short, you need to put a blank file named
__init__.py
in the lib
directory.
More Related Contents:
- How to fix “Attempted relative import in non-package” even with __init__.py
- Sibling package imports
- How to load all modules in a folder?
- ImportError: Cannot import name X
- Importing modules: __main__ vs import as module
- Imports in __init__.py and ‘import as’ statement
- Why does Python’s __import__ require fromlist?
- ImportError: No module named
- Unresolved Import Issues with PyDev and Eclipse
- How does python find a module file if the import statement only contains the filename?
- Force python to use an older version of module (than what I have installed now)
- ‘ModuleNotFoundError’ when trying to import module from imported package
- How does one do the equivalent of “import * from module” with Python’s __import__ function?
- Import a python module without running it
- What does from __future__ import absolute_import actually do?
- Python Nose Import Error
- Prevent Python from caching the imported modules
- Good or bad practice in Python: import in the middle of a file [duplicate]
- import error: ‘No module named’ *does* exist
- How can I import a module dynamically given the full path?
- python using variables from another file
- Importing modules in Python – best practice
- How to solve import error for pandas?
- Python: is the current directory automatically included in path?
- Import paths – the right way?
- Hide external modules when importing a module (e.g. regarding code-completion)
- ImportError: libSM.so.6: cannot open shared object file: No such file or directory
- import matplotlib.pyplot hangs
- How to properly use relative or absolute imports in Python modules?
- How to reference python package when filename contains a period