[SciPy-user] install problem on Mandrake-8.2

Gerard Vermeulen gvermeul at polycnrs-gre.fr
Wed May 22 04:41:29 EDT 2002


On Tuesday 21 May 2002 23:02, Pearu Peterson wrote:

> Here follows another idea. It seems that you can import all other
> extension modules except _minpack.so. Can you confirm that? Look
> in scipy/build/lib.linux-i686-2.2/scipy/* for *.so files and try to import
> them directly one-by-one. Do you find other failing modules?
>
Yes _minpack.so is the only failing module
>
> When I compare the source of _minpack with other sources I see that it
> does not use
>
> #define PY_ARRAY_UNIQUE_SYMBOL PyArray_API
>
> before including Numeric/arrayobject.h. I am not sure if it matters but
> you can try to add this #define statement just before the
>
> #include "Numeric/arrayobject.h"
>
> statement in scipy/optimize/minpack.h file.
>
Done, but it does not help (I think that it may matter with versions
of Numeric close to 20.0.0, but not with 21.0)

Tonight, I will try if scipy-0.2 works with Python-2.1.x on this machine.

But my motivation for installing scipy-0.2 is driven by an incompatibility
between scipy-0.1 and Python-2.2 (I managed to build scipy-0.1 for
python-2.2.1)
The problem is with colex in pstats.py (in scipy-0.1):

[packer at venus i586]$ python
Python 2.2.1 (#1, May  8 2002, 22:31:32)
[GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)] on linux-i386
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
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
>>>

Is there a workaround for this? Apparently the semantics of exec
changed between Python-2.1 and Python-2.2.

Again, thanks a lot for the support.

Gerard



More information about the SciPy-User mailing list