installing my own module: module not recognized

Discussion in 'Python' started by Darren Dale, Jul 20, 2004.

  1. Darren Dale

    Darren Dale Guest

    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
     
    Darren Dale, Jul 20, 2004
    #1
    1. Advertising

  2. Darren Dale

    Darren Dale Guest

    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',
    author_email='',
    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',
    ],)
     
    Darren Dale, Jul 20, 2004
    #2
    1. Advertising

  3. Darren Dale

    Darren Dale Guest

    disregard

    I just realized that a __init__.py file is required.
     
    Darren Dale, Jul 20, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S. Justin Gengo
    Replies:
    0
    Views:
    503
    S. Justin Gengo
    Aug 26, 2003
  2. Stefan Siegl
    Replies:
    1
    Views:
    774
  3. Darren Dale

    module name not recognized

    Darren Dale, Oct 8, 2004, in forum: Python
    Replies:
    9
    Views:
    319
    Darren Dale
    Oct 10, 2004
  4. mgdevos
    Replies:
    3
    Views:
    561
    martine de vos
    Mar 27, 2009
  5. Replies:
    8
    Views:
    125
    Anno Siegel
    Jan 21, 2005
Loading...

Share This Page