module name not recognized

Alan Kennedy alanmk at hotmail.com
Sat Oct 9 11:19:48 EDT 2004


[Darren Dale]
 >>>I have built two basic modules using distutils. One of them
 >>> installs fine, but the other, I can't import modules from it.
 >>> I've been pouring over the code and I cant find the problem.

[Larry Bates]
 >>Two things to check:
 >>
 >>Does the package have the required __init__.py file?
 >>Is the directory where it is installed on the PYTHONPATH?

[Darren Dale]
 > I checked both before writing the original post, this isnt the
 > problem.

One more thing to check: have you named your module with an identical 
name to an existing module that is before your module the path, e.g. 
calling your module "xml" or "email", which clash with standard 
library modules. This is a frequent cause of hair-pulling inexplicable 
behaviour.

If that isn't the problem either, then you're probably best off 
posting more details, i.e. what are your modules called, where are 
they located, what doesn't work/what exceptions are raised, etc.

regards,

alan.



More information about the Python-list mailing list