[SciPy-user] Confused Newbie

Mike Sowka mike at sowka.com
Sat Apr 13 23:30:44 CDT 2002


Hello folks,
I would like to make the switch from Octave to SciPy, having heard
nothing but praise about the modules, but have run into a couple of
hurdles.
  I consider myself fairly capable of building/installing linux
software, and the SciPy install wen't fairly smooth:

I run RedHat 7.2 with Python 2.2.1

1) build/install wxGTK
2) build/install wxPython
3) build/install fftw & fftw-devel RPMS
4) build SciPy <---

NOTE: During SciPy build it complained about not seeing /usr/lib/lfftw*
libraries. I noticed that the fftw libraries in my /usr/lib where in the
form of two versions libdfftw* and libsfftw* ( I made a ln -s to the "d"
ones figuring that's d for "double precision" ... I donno)

Anyways, like I said it seemed like everything during the install went
smoothly... UNTIL I tried using SciPy: here are some "borked" outputs
when I try to do the simplest things from the scipy.org tutorials:

************************************************************************
>>> from scipy import gplt
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 42, in
?
    from misc import *
  File "/usr/lib/python2.2/site-packages/scipy/misc.py", line 21, in ?
    import scipy.stats
  File "/usr/lib/python2.2/site-packages/scipy/stats/__init__.py", line
4, in ?
    from stats import *
  File "/usr/lib/python2.2/site-packages/scipy/stats/stats.py", line
204, in ?
    import math, string, sys, pstat, copy
  File "/usr/lib/python2.2/site-packages/scipy/stats/pstat.py", line 176
    exec execstring
SyntaxError: unqualified exec is not allowed in function 'colex' it
contains a nested function with free variables
***************************************************************************
---> funny thing is when I tried importing again after a while of
fiddling around it WORKED!!

HERE IS ANOTHER ONE:
***************************************************************************
>>> from scipy import plt
>>> plt.plot((1,2,3))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/scipy/plt/interface.py", line
395, in plot
    groups = plot_groups(data)
  File "/usr/lib/python2.2/site-packages/scipy/plt/interface.py", line
237, in plot_groups
    group,remains = get_plot_group(remains)
  File "/usr/lib/python2.2/site-packages/scipy/plt/interface.py", line
249, in get_plot_group
    el = asarray(el)
NameError: global name 'asarray' is not defined
***************************************************************************

Pretty much giving up on the plot modules I went on to another tutorial
on integrating...:

***************************************************************************
>>> from scipy import integrate
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/scipy/integrate/__init__.py",
line 23, in ?
    scipy.somenames2all(__all__, _moddict, globals())
  File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 9, in
somenames2all
    exec("from %s import %s" % (key, string.join(namedict[key],',')),
gldict)
  File "<string>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/scipy/integrate/quadpack.py",
line 113, in ?
    Inf = 1e308**10
OverflowError: (34, 'Numerical result out of range')
***************************************************************************

Again this modules succeded when I tried again after a while... ??? BUT:

***************************************************************************
>>> result = integrate.quad(lambda x: special.jv(2.5, x), 0, 4.5)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'integrate' is not defined
>>> from scipy import integrate
>>> result = integrate.quad(lambda x: special.jv(2.5, x), 0, 4.5)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'quad'
***************************************************************************

CONCLUSION: There is some uncompatibility with my distro and/or
python2.2.1 or I really messed something up during install. Any hints or
suggestion are MUCH appreciated.
Thank You,
Mike

-- 
/*******************************************************************\
|      Mike Sowka                   o      _     _         _        |
| An Aspiring Engi"Nerd"    _o     /\_   _ \\o  (_)\__/o  (_)       |
|  Carleton University    _< \_   _>(_) (_)/<_    \_| \   _|/' \/   |
| msowka at doe.carleton.ca (_)>(_) (_)        (_)   (_)    (_)'  _\o_ |
| (home mike at sowka.com)                                             |
\*******************************************************************/




More information about the SciPy-user mailing list