[SciPy-dev] Python 2.2 compatibility?

eric eric at scipy.org
Thu Feb 14 14:46:50 CST 2002


>
> Hi folks-
>
> In my continuing attempt to build scipy with Python 2.2 on
> Solaris....  Okay, now it all builds (after changing the
> library list to eliminate "f90") and installs.  It just
> won't load!  On "import scipy" I get:
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/home/laplace/lib/python2.2/site-packages/scipy/__init__.py", line 42,
in ?
>     from misc import *
>   File "/home/laplace/lib/python2.2/site-packages/scipy/misc.py", line 21, in
?
>     import scipy.stats
>   File "/home/laplace/lib/python2.2/site-packages/scipy/stats/__init__.py",
line 4, in ?
>     from stats import *
>   File "/home/laplace/lib/python2.2/site-packages/scipy/stats/stats.py", line
204, in ?
>     import math, string, sys, pstat, copy
>   File "/home/laplace/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
>
> Looks like the pstat.py module is unhappy with how 2.2 enforces
> scoping.  Has this been fixed?

Don't think so.  Man do we need to get stats cleaned up.

>  The scipy install page says
> it works with "version 2.1 or higher"

I changed this to say version 2.1.x.  Probably not the fix you were looking
for...

> but if 2.2 requires fixes
> that are only in CVS, perhaps it's time to release a more
> up-to-date snapshot.

The CVS is broken for all versions of Python right now.  Once linalg is cleaned
up, perhaps we should release a snapshot.  Also, fixing the pstat problem with
2.2 would be good.

> PS: One other minor obstacle I encountered:  Scipy requires
> both the single and double precision libraries for FFTW.  No
> problem, the FFTW install instructions tell you explicitly
> how to install both versions.  However, the recommended
> installation names the double version "dfftw" and the
> single one "sfftw."

The chosen approach was used because this is how most of the fftw packages were
built (rpm, etc.) and we wanted to be compatible with what people were
installing.

>  Scipy wants the double one named
> "fftw".  It's no problem to do that, but perhaps this
> requirement should be mentioned on the install page, since
> it is not how FFTW suggests a dual-precision installation
> be done.  Or the setup script should be changed to reflect
> the FFTW recommendations.

We mention how to build them on the build page.  I've edited the binary install
page to point at this now for fftw.

Thanks for all your comments.  I think we're close to a 2.2 compatible version
(sounds like it builds now).  Now we need to get everything operating correctly.

eric


> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev
>





More information about the Scipy-dev mailing list