我有如下一个文件夹层次包:无法导入包含.pyc文件文件
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.
我已经搜索了它,发现像附加到sys路径和关键字,但似乎没有任何工作的各种选择。
在'dbtest.py'中打印'sys.path'时会得到什么? –
你为什么要导入一个.pyc文件? – juankysmith
sys.path显示python lib,site-packages,dll的路径。 –