Need help getting MoinMoin to run under WSGI

Ron Garret rNOSPAMon at flownet.com
Sun Dec 28 17:26:23 EST 2008


In article 
<f97e6514-1d36-42ed-b0f7-98e2b316209b at d36g2000prf.googlegroups.com>,
 Graham Dumpleton <Graham.Dumpleton at gmail.com> wrote:

> On Dec 28, 7:22 pm, Ron Garret <rNOSPA... at flownet.com> wrote:
> > In article <rNOSPAMon-79FA22.21571527122... at news.gha.chartermi.net>,
> >  Ron Garret <rNOSPA... at flownet.com> wrote:
> >
> >
> >
> > > I successfully installed MoinMoin as a CGI according to the instructions
> > > on the moinmo.in site.  But when I tried to switch over to running it
> > > under wsgi it failed thusly:
> >
> > > [Sat Dec 27 21:44:14 2008] [error] [client 66.214.189.2] Traceback (most
> > > recent call last):
> > > [Sat Dec 27 21:44:14 2008] [error] [client 66.214.189.2]   File
> > > "/www/wikis/genesisgroup/moin.wsgi", line 49, in ?
> > > [Sat Dec 27 21:44:14 2008] [error] [client 66.214.189.2]     from
> > > MoinMoin.server.server_wsgi import WsgiConfig, moinmoinApp
> > > [Sat Dec 27 21:44:14 2008] [error] [client 66.214.189.2] ImportError: No
> > > module named MoinMoin.server.server_wsgi
> >
> > > The problem, I believe, is that I have both Python 2.4 and 2.5 installed
> > > (it's a Debian box) and MM is installed under 2.5 but WSGI is using 2.4. 
> > >  
> > > I tried to fix this by setting WSGIPythonHome but to no avail.  I can't
> > > figure out what to set it to.  The instructions say:
> >
> > > "the WSGIPythonHome directive should be used to specify the exact
> > > location of the Python installation corresponding to the version of
> > > Python compiled against"
> >
> > > I have two problems with this.  First, I didn't compilemod_wsgi, I got
> > > it pre-built as a Debian module.  Second, what does "the exact location
> > > of the Python installation" even mean?  Python2.5 is spread out in at
> > > least three different places: /usr/local/bin, /usr/lib/python2.5, and
> > > /usr/local/lib/python2.5.  I've tried setting WSGIPythonHome to all of
> > > those (and a few other things as well) and nothing worked.
> >
> > > Also, "the version of Python compiled against" seems very odd.  What
> > > does that mean?  Surely I don't have to recompilemod_wsgievery time I
> > > change to a new version of Python?
> >
> > > Help!  Thanks!
> >
> > > rg
> >
> > So never mind, I figured it out.  I did indeed have to 
> > recompilemod_wsgifrom source to get it to use Python 2.5.  (That turned out 
> > to
> > be a major hassle.  I had to do it twice.  The first time through it
> > made Apache dump core.  I still don't know why.)
> >
> > Seems to be working now though.
> 
> It probably crashed the first time because you didn't do a full stop
> of Apache and instead just did a reload. Doing a reload may not unload
> the Python libraries from Apache process correctly and so would have
> been a mix of code for different versions of Python in same process.
> 
> Graham

Yes, I don't specifically recall exactly what happened now, but that 
seems likely.

Thanks,
rg



More information about the Python-list mailing list