Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: python import error Date: Wed, 11 Dec 2013 04:53:34 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 25 Message-ID: References: <93405ea9-6faf-4a09-9fd9-ed264e3136e1@googlegroups.com> NNTP-Posting-Host: panix1.panix.com X-Trace: reader1.panix.com 1386737614 23086 166.84.1.1 (11 Dec 2013 04:53:34 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 11 Dec 2013 04:53:34 +0000 (UTC) User-Agent: nn/6.7.3 Xref: csiph.com comp.lang.python:61526 In <93405ea9-6faf-4a09-9fd9-ed264e3136e1@googlegroups.com> smilesonisamal@gmail.com writes: > File "aaa.py", line 5, in > from ccc.ddd import sss > ImportError: No module named ccc.ddd > directory structure as follows: > ccc > | > ddd > | > aaa.py > sss.py A python file isn't importable unless the directory also contains a file named __init__.py . Try making __init__.py files in the ccc and ddd directories. If you don't know what to put in them, just leave them blank. -- John Gordon Imagine what it must be like for a real medical doctor to gordon@panix.com watch 'House', or a real serial killer to watch 'Dexter'.