ImportError: No module named math

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • M. Lavasani

    ImportError: No module named math

    Hi

    I am trying to test Python-2.3.

    Any solution for this problem please:

    [color=blue][color=green][color=darkred]
    >>>gmake test[/color][/color][/color]
    case $MAKEFLAGS in \
    *-s*) LD_LIBRARY_PATH =/net/ia64/lavasani/Python-2.3:/usr/local/lib/hpux32:/usr/local/lib CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \
    *) LD_LIBRARY_PATH =/net/ia64/lavasani/Python-2.3:/usr/local/lib/hpux32:/usr/local/lib CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \
    esac
    running build
    running build_ext
    running build_scripts
    find ./Lib -name '*.py[co]' -print | xargs rm -f
    LD_LIBRARY_PATH =/net/ia64/lavasani/Python-2.3:/usr/local/lib/hpux32:/usr/local/lib ./python -E -tt ./Lib/test/regrtest.py -l
    Traceback (most recent call last):
    File "./Lib/test/regrtest.py", line 75, in ?
    import random
    File "/net/ia64/lavasani/Python-2.3/Lib/random.py", line 42, in ?
    from math import log as _log, exp as _exp, pi as _pi, e as _e
    ImportError: No module named math
    gmake: [test] Error 1 (ignored)
    LD_LIBRARY_PATH =/net/ia64/lavasani/Python-2.3:/usr/local/lib/hpux32:/usr/local/lib ./python -E -tt ./Lib/test/regrtest.py -l
    Traceback (most recent call last):
    File "./Lib/test/regrtest.py", line 75, in ?
    import random
    File "/net/ia64/lavasani/Python-2.3/Lib/random.py", line 42, in ?
    from math import log as _log, exp as _exp, pi as _pi, e as _e
    ImportError: No module named math
    gmake: *** [test] Error 1



    But I can see the math module

    [color=blue][color=green][color=darkred]
    >>>find . -name \*math*[/color][/color][/color]
    ../Doc/lib/libcmath.tex
    ../Doc/lib/libmath.tex
    ../Lib/test/output/test_math
    ../Lib/test/test_cmath.py
    ../Lib/test/test_math.py
    ../Modules/cmathmodule.c
    ../Modules/mathmodule.c
    ../build/temp.hp-ux-B.11.22-ia64-2.3/cmathmodule.o
    ../build/temp.hp-ux-B.11.22-ia64-2.3/mathmodule.o
    ../build/lib.hp-ux-B.11.22-ia64-2.3/cmath.so
    ../build/lib.hp-ux-B.11.22-ia64-2.3/math.so

Working...