The case of the missing modules

Discussion in 'Python' started by Dan Bishop, Jul 26, 2003.

  1. Dan Bishop

    Dan Bishop Guest

    I installed Python on the HP 3000 at work today.

    The interpreter itself appears to be working fine, but "import math",
    "import datetime", etc. fail with "ImportError: No module named
    [name]". (However, os and system can be imported successfully.)

    I used help('modules') to print a list of available modules and there
    were only 14 (__builtin__, _codecs, _sre, _symtable, errno,
    exceptions, gc, imp, marshal,
    posix, signal, sys, xxsubtype, zipimport).

    Any ideas as to why Python can't find most of its modules?

    -------------------------------------------------------------------------------

    $ ./python -v
    # installing zipimport hook
    import zipimport # builtin
    # installed zipimport hook
    # /tmp/python/Lib/site.pyc matches /tmp/python/Lib/site.py
    import site # precompiled from /tmp/python/Lib/site.pyc
    # /tmp/python/Lib/os.pyc matches /tmp/python/Lib/os.py
    import os # precompiled from /tmp/python/Lib/os.pyc
    import posix # builtin
    # /tmp/python/Lib/posixpath.pyc matches /tmp/python/Lib/posixpath.py
    import posixpath # precompiled from /tmp/python/Lib/posixpath.pyc
    # /tmp/python/Lib/stat.pyc matches /tmp/python/Lib/stat.py
    import stat # precompiled from /tmp/python/Lib/stat.pyc
    # /tmp/python/Lib/copy_reg.pyc matches /tmp/python/Lib/copy_reg.py
    import copy_reg # precompiled from /tmp/python/Lib/copy_reg.pyc
    # /tmp/python/Lib/types.pyc matches /tmp/python/Lib/types.py
    import types # precompiled from /tmp/python/Lib/types.pyc
    # /tmp/python/Lib/warnings.pyc matches /tmp/python/Lib/warnings.py
    import warnings # precompiled from /tmp/python/Lib/warnings.pyc
    # /tmp/python/Lib/linecache.pyc matches /tmp/python/Lib/linecache.py
    import linecache # precompiled from /tmp/python/Lib/linecache.pyc
    Python 2.3c1 (#9, Aug 13 1970, 13:25:05)
    [GCC 3.2.2] on mpeix70
    Type "help", "copyright", "credits" or "license" for more information.
    >>> raise SystemExit

    # clear __builtin__._
    # clear sys.path
    # clear sys.argv
    # clear sys.ps1
    # clear sys.ps2
    # clear sys.exitfunc
    # clear sys.exc_type
    # clear sys.exc_value
    # clear sys.exc_traceback
    # clear sys.last_type
    # clear sys.last_value
    # clear sys.last_traceback
    # clear sys.path_hooks
    # clear sys.path_importer_cache
    # clear sys.meta_path
    # restore sys.stdin
    # restore sys.stdout
    # restore sys.stderr
    # cleanup __main__
    # cleanup[1] zipimport
    # cleanup[1] warnings
    # cleanup[1] signal
    # cleanup[1] site
    # cleanup[1] linecache
    # cleanup[1] posix
    # cleanup[1] types
    # cleanup[1] exceptions
    # cleanup[2] stat
    # cleanup[2] copy_reg
    # cleanup[2] posixpath
    # cleanup[2] os
    # cleanup[2] os.path
    # cleanup sys
    # cleanup __builtin__
    # cleanup ints: 4 unfreed ints in 4 out of 105 blocks
    # cleanup floats
    $ set | grep "PYTHON"
    PYTHONHOME="/tmp/python"
    PYTHONPATH="/tmp/python/Lib"
    Dan Bishop, Jul 26, 2003
    #1
    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. Steve Franks
    Replies:
    2
    Views:
    1,235
    Steve Franks
    Jun 10, 2004
  2. Tee
    Replies:
    3
    Views:
    7,767
    Herfried K. Wagner [MVP]
    Jun 23, 2004
  3. Janice

    lower case to upper case

    Janice, Dec 10, 2004, in forum: C Programming
    Replies:
    17
    Views:
    1,155
    Richard Bos
    Dec 14, 2004
  4. Replies:
    1
    Views:
    2,457
    Mark P
    Apr 6, 2007
  5. darrel

    'case' vs. 'case is'

    darrel, Aug 14, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    262
    Rory Becker
    Aug 14, 2008
Loading...

Share This Page