【发布时间】:2011-03-31 09:46:14
【问题描述】:
在使用2to3(参见我的previous question)转换为 Python 3.x 后,我在构建过程中收到此错误:
File "setup.py", line 28, in <module>
from . import mof_compiler
ValueError: Attempted relative import in non-package
代码:
from . import mof_compiler
mof_compiler._build()
但我不知道为什么这是错误的,因为 mof_compiler 与 setup.py 在同一个目录中。请帮忙!
【问题讨论】:
标签: python python-3.x python-2to3