This is happening because A
and B
are independent, unrelated, packages as far as Python is concerned.
Create a __init__.py
in the same directory as Driver.py
and everything should work as expected.
More Related Contents:
- Relative imports for the billionth time
- `from … import` vs `import .` [duplicate]
- Adding a module (Specifically pymorph) to Spyder (Python IDE)
- Import module from subfolder
- Python: importing a sub‑package or sub‑module
- Can’t import my own modules in Python
- Can’t import my own modules in Python
- How to import module when module name has a ‘-‘ dash or hyphen in it?
- How to import all submodules?
- Python module with a dash, or hyphen (-) in its name
- How to change a module variable from another module?
- Use a library locally instead of installing it
- How does Python importing exactly work?
- How to access a standard-library module in Python when there is a local module with the same name?
- How to import a module in Python with importlib.import_module
- What could cause a python module to be imported twice?
- Namespaces with Module Imports
- How to prevent a module from being imported twice?
- ImportError on python 3, worked fine on python 2.7
- Python import mechanics
- Python importing a module from a parallel directory
- How to make global imports from a function?
- how to test if one python module has been imported?
- Relative imports in python 2.5
- from … import OR import … as for modules
- How to make an “always relative to current module” file path?
- Relative import in Python 3 is not working [duplicate]
- Flask(‘application’) versus Flask(__name__)
- python import module from parent package
- How to reference python package when filename contains a period