[SciPy-user] "import scipy" fails with Python-2.2a4

Travis Oliphant oliphant at ee.byu.edu
Fri Dec 21 10:18:08 CST 2001


> I've compiled the latest SciPy successfully. However, when importing the
> module this is the result:

> "/fmnt/stbsvr/sdata/apps/inst/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
> >>>
>

This is a documented error for Python 2.2 which changed the implementation
of exec.  The pstat functions using exec must be re-written.  Until this
is done, disable the stats package by not including it in the list of
subpackages to be imported in the main __init__.py  file

scipy/__init__.py


-Travis





More information about the SciPy-user mailing list