While @ErikCederstrand's answer is correct and probably sufficient for you, I was curious why it failed, so I started digging through the cpython source. So, for any future visitors, here is what I found.
, , : https://github.com/python/cpython/blob/3.4/Lib/importlib/_bootstrap.py#L2207
2209 , :
parent = name.rpartition('.')[0] # Value of 'io'
io, . , if false, , "io":
if name in sys.modules:
return sys.modules[name]
parent_module = sys.modules[parent]
, , (io ) __path__. , , , , , :
try:
path = parent_module.__path__
except AttributeError:
msg = (_ERR_MSG + '; {!r} is not a package').format(name, parent)
raise ImportError(msg, name=name)
, , , , parent_module.__ path__ , , .
, TL;DR: , , , , , , io.
EDIT: , __path__ , init_module_attrs:
if _override or getattr(module, '__path__', None) is None:
if spec.submodule_search_locations is not None:
try:
module.__path__ = spec.submodule_search_locations
except AttributeError:
pass