[python-win32] distutils question

Niki Spahiev niki@vintech.bg
Fri, 29 Mar 2002 11:06:54 +0200


Jim Vickroy wrote:
> I have written my first, simple setup.py for use with the distutils
> module; I am experiencing some problems.
> 
> When it is exexcuted, the following output is generated:
> 
> running install
> running build
> running build_py
> creating build
> creating build\lib
> creating build\lib\GOES_12
> creating build\lib\GOES_12\SXI
> creating build\lib\GOES_12\SXI\GDS
> creating build\lib\GOES_12\SXI\GDS\processor
> copying GOES_12\SXI\GDS\processor\__init__.py ->
> build\lib\GOES_12\SXI\GDS\processor
> copying GOES_12\SXI\GDS\processor\foo.py ->
> build\lib\GOES_12\SXI\GDS\processor
> running install_lib
> creating C:\Python22\Lib\site-packages\GOES_12
> creating C:\Python22\Lib\site-packages\GOES_12\SXI
> creating C:\Python22\Lib\site-packages\GOES_12\SXI\GDS
> creating C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor
> copying build\lib\GOES_12\SXI\GDS\processor\foo.py ->
> C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor
> copying build\lib\GOES_12\SXI\GDS\processor\__init__.py ->
> C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor
> byte-compiling
> C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor\foo.py to
> foo.pyc
> byte-compiling
> C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor\__init__.py to
> __init__.pyc
> 
> 
> Everything looks fine; however, whenever I try to import it ...
> 
> 
>>>>import GOES_12.SXI.GDS.processor.foo
>>>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: No module named GOES_12.SXI.GDS.processor.foo
> 
> What have I overlooked?  Do I explicitly need to add the directory
> location to PYTHONPATH or the Windows registry?

No but IMO you don't have __init__.py in GOES_12, GOES_12\SXI, 
GOES_12\SXI\GDS

HTH
Niki Spahiev