470,647 Members | 1,248 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

installing my own module: module not recognized

I followed the online docs on how to create and install a module. python
setup.py install seems to work fine, I did python setup.py register as
well (not sure what this is for).

setup created a folder for me called Spec in python23/Lib/site-packages,
and included my files: analysis.py/c and SpecDB.py/c. Running the
interpretter, from Spec.analysis import * complains that there is no
module named Spec.analysis. from Spec import * gives the same complaint.

If you recognize my oversight, would you let me know what it is?

Thanks,
Darren
Jul 18 '05 #1
2 1246
Darren Dale wrote:
I followed the online docs on how to create and install a module. python
setup.py install seems to work fine, I did python setup.py register as
well (not sure what this is for).

setup created a folder for me called Spec in python23/Lib/site-packages,
and included my files: analysis.py/c and SpecDB.py/c. Running the
interpretter, from Spec.analysis import * complains that there is no
module named Spec.analysis. from Spec import * gives the same complaint.

If you recognize my oversight, would you let me know what it is?

Thanks,
Darren

forgot to include my setup.py script:

from distutils.core import setup

setup(name="Spec",
version="0.0.1",
author='Darren Dale',
au****************@cornell.edu',
description='Read Spec data to callable DB, recall for analysis',
#py_modules=['analysis','SpecDB'],
packages=['Spec'],
classifiers = [
'Development Status :: Experimental',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
],)
Jul 18 '05 #2
I just realized that a __init__.py file is required.
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jean-Christian Imbeault | last post: by
5 posts views Thread by Julia Goolia | last post: by
reply views Thread by Alex Lapp | last post: by
2 posts views Thread by maxwell | last post: by
reply views Thread by Terry Reedy | last post: by
reply views Thread by Gabriel Genellina | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.