Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7793013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:21:11+00:00 2026-06-01T22:21:11+00:00

I am trying to import a module in python that contains the following lines:

  • 0

I am trying to import a module in python that contains the following lines:

#setup.py
def isnumber(pause):
    try:
        float(pause)
        return True
    except ValueError:
        return False

I am trying to call it like this:

#program.py
import setup

but I get the following error:

    Traceback (most recent call last):
  File "C:\Users\rthompson@iingen.unam.mx\ralph\programas\python\scraper\release\program.py", line 4, in <module>
    import setup
  File "C:\Users\rthompson@iingen.unam.mx\ralph\programas\python\lib\setup.py", line 55, in <module>
    download_url="http://www.crummy.com/software/BeautifulSoup/download/"
  File "C:\Users\rthompson@iingen.unam.mx\ralph\programas\python\lib\distutils\core.py", line 140, in setup
    raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: program.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: program.py --help [cmd1 cmd2 ...]
   or: program.py --help-commands
   or: program.py cmd --help

error: no commands supplied

Line 55 in setup.py corresponds to return True in the code above.

Without the isnumber function the import works as expected.

Can anyone see what I’m doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:21:12+00:00Added an answer on June 1, 2026 at 10:21 pm

    You’ve decided to call your module “setup.py”. This is a dangerous name to pick since it’s commonly used for the build/install script for Python modules, much like the one yours already has. Pick a different name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to load a python module that contains a math and numpy import
So I am trying to import a module foo that contains directories bar and
I'm really new to Python. I'm trying to import a third party module called
I am trying to create a shared library (really a Python module) that links
When trying to import cv in python I get: ImportError: No module named cv.
I have a Python module that I want to dynamically import given only a
I'm trying to setup a project that contains commons apps (projectA) to be shared
I'm trying to import a Python module in a C# code like this: var
I'm trying to import a cython module data.pyx into another cython module user.pyx. Everything
I'm trying to import an XML that's provided by twitter into a readable format

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.