Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > installing my own module: module not recognized

Reply
Thread Tools

installing my own module: module not recognized

 
 
Darren Dale
Guest
Posts: n/a
 
      07-20-2004
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
 
Reply With Quote
 
 
 
 
Darren Dale
Guest
Posts: n/a
 
      07-20-2004
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='(E-Mail Removed)',
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',
],)
 
Reply With Quote
 
 
 
 
Darren Dale
Guest
Posts: n/a
 
      07-20-2004
I just realized that a __init__.py file is required.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
imported module scitools not recognized mgdevos Python 3 03-27-2009 01:43 PM
installing module to my own directory with MCPAN ioneabu@yahoo.com Perl Misc 8 01-21-2005 12:37 PM
module name not recognized Darren Dale Python 9 10-10-2004 06:09 PM
Own module needs loaded module from main script Bart Van der Donck Perl Misc 4 08-27-2004 09:17 PM
AIM-ATM module not recognized Mimmus Cisco 5 06-18-2004 01:01 PM



Advertisments