Error of "No module named xxx"

1240阅读 0评论2012-09-12 wdove
分类:Python/Ruby


$ ./newrc_staf.py
Traceback (most recent call last):
  File "./newrc_staf.py", line 12, in
    from release import NightlyRelease
  File "/rootfs/git/newrc_staf_py/release/__init__.py", line 11, in
    from tools import losetup
ImportError: No module named tools

Solution:
Create corresponding __init__.py under import directories.
上一篇:Error of "E: There are problems and -y was used without --force-yes"
下一篇:==等号判断运算符使用失效