我有一个文件夹层次结构如下:
test\
dbtest.py
lib1\
__init__.pyc
lib2\
test.pyc
__init__.pyc
在 dbtest.py 我想导入 test.pyc
为此,我写了以下声明:import lib1.lib2.test
但是当我尝试执行该代码时,我收到以下错误:
ImportError: DLL load failed: The specified module could not be found.
我已经搜索过它并找到了各种替代方法,例如 append to sys path 和 from 关键字,但似乎没有任何效果。