[SciPy-Dev] import scipy.stats hangs in mod_python application

fork forkandwait@gmail....
Mon Aug 29 00:32:20 CDT 2011


Robert Kern <robert.kern <at> gmail.com> writes:

> 
> On Sun, Aug 28, 2011 at 20:38, fork <forkandwait <at> gmail.com> wrote:
> > Robert Kern <robert.kern <at> gmail.com> writes:
> >
> >> So, has your program ever worked under mod_python? Is this an
> >> intermittent problem, or is it reliably repeatable? In your program,
> >> do you import numpy before the scipy.stats import?
> >
> > Yeah, worked great until last week.
> 
> Would you mind answering all of the questions rather than just the first? 

Sorry (hehe) ... worked great for years, reliable problem, import numpy (and
scipy) before scipy.stats.

> Can you identify what changed last week? Did you change your program?  Did you
> upgrade Apache/mod_python? That's going to be the only way to figure out what
> is wrong.

We upgraded the default python on gentoo from 2.6 to 2.7, so, like, everything
changed and it is almost impossible to say what exactly.  My partner helped
upgrade a bunch of math libraries, but I wasn't part of that so don't know
exactly (yet...).  I don't *believe* that apache got upgraded, and mod_python is
definitely not upgraded, but it was reinstalled.

> You may want to take a quick look at a couple of the WSGI
> micro-frameworks around to see if they might be able to quickly
> implement the dispatching you need.
> 
>   http://bottlepy.org/docs/dev/
>   http://flask.pocoo.org/

That is great advice, but (1) I am still smarting from depending on a framework
that got dropped from current development (three years ago cherrypy would have
been in the list above), and (2) I don't have the 100 or so hours to refactor
everything to fix this one (new) problem on code that probably won't see a next
generation anyway.  So, ... probably not gonna happen.  On a fresher project,
... well, I would avoid frameworks like the plague and make it all cgi.  (I hope
I am not coming off obnoxious, but we probably don't need to discuss this any
more.)




More information about the SciPy-Dev mailing list