importing modules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • reetamca
    New Member
    • Sep 2007
    • 7

    importing modules

    I could not import modules like os,glob and other standard modules in python..
    The only module i can import is sys...

    import site' failed; use -v for traceback
    is the error code i get if i open the editor...


    >>>import os
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named os\
    >>>


    what should i include do to get my modules import?
  • aruni
    New Member
    • Sep 2007
    • 4

    #2
    check weather u installed it correctly

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      Originally posted by reetamca
      I could not import modules like os,glob and other standard modules in python..
      The only module i can import is sys...

      import site' failed; use -v for traceback
      is the error code i get if i open the editor...


      >>>import os
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      ImportError: No module named os\
      >>>


      what should i include do to get my modules import?
      Your installation does seem a bit odd... "use -v for traceback": The verbose option is normally set in off the shelf versions. So:
      Did you compile this sub-version?
      What's your OS, etc.
      If you didn't do the compile, where'd you get the version of python and what is that version?
      Etc, etc???

      Comment

      • reetamca
        New Member
        • Sep 2007
        • 7

        #4
        Originally posted by bartonc
        Your installation does seem a bit odd... "use -v for traceback": The verbose option is normally set in off the shelf versions. So:
        Did you compile this sub-version?
        What's your OS, etc.
        If you didn't do the compile, where'd you get the version of python and what is that version?
        Etc, etc???

        My python version is 2.5.1
        My OS is Windows XP
        How to set the verbose option to ON?

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #5
          Originally posted by reetamca
          My python version is 2.5.1
          My OS is Windows XP
          How to set the verbose option to ON?
          This indicates that you have a bad installation. You must re-install.
          Be sure to include all optional packages.
          Use the
          Python 2.5.1 Windows installer
          (Windows binary -- does not include source)
          from the Download Standard Python Software page.

          That should solve all of your problems at one time.

          Comment

          Working...