Graham Dumpleton
graham.dumpleton at gmail.com
Thu Nov 6 00:24:58 EST 2008
2008/11/6 Normando Hall <nhall at unixlan.com.ar>: > I was reading your response and clarified some questions and I think I can > run everything. > > I have python 2.3 installed by default and can not uninstall it for > compatibility reasons. It is installed in /usr/lib/python2.3 and access it > through the file (which is on the PATH) "python" in /usr/bin. > > Python 2.4 installed under /usr/lib/python2.4 and access to it is through > "python2.4" in /usr/bin. > > So, if I ran python -V I get: > [root @ devel-server conf] # python -V > Python 2.3.4 > > On the other hand, if I run python2.4 -V I get: > [root @ devel-server conf] # python2.4 -V > Python 2.4.2 > > What I need to do is to compile mod_python against python 2.4, but not as I > did before. Before I moved > cp /usr/bin/python2.4 /usr/bin/python > > and I was by default when running python I get python 2.4.2 > > What I need to do is to compile mod_python against python 2.4 but tell that > uses /usr/bin/python2.4 instead of /usr/bin/python > > Is there a way to do it? If both are already installed under /usr, then use: ./configure --with-python=/usr/bin/python2.4 I believe this is documented in the installation instructions in the source code. That should just work without any fiddles in Apache startup scripts. The fiddles would only be necessary if had to install second Python version under different root and so 'python' executable found by mod_python at startup was for wrong version. Note that that mod_python looks for 'python' executable is only so it can work out where corresponding lib directory is, it doesn't actually run the 'python' executable as it already embeds the Python interpreter code. Graham > Thank you > Normando > > Graham Dumpleton escribió: > > 2008/11/6 Normando Hall <nhall at unixlan.com.ar>: > > > Opsss, sorry. > > Surftrackr is the best squid/dansguardian log analizer app I can found on > the web: http://surftrackr.net > > > That is a Django sub application by the look of it. > > Lets go backwards for a moment, why do you need mod_python for Python > 2.3 still. Why can't you just compile and install mod_python compiled > against newer version of Python and use that for everything. That way > you don't need mod_python to handle two versions of Python. > > To do this you just need to install newer version of Python under > /usr/local. You may though need to do a fiddle in Apache startup > scripts to make sure it picks up Python from correct place. > > BTW, if only wanting to host Django, you might also look at mod_wsgi, > it can be a bit easier to configure especially in respect of pointing > it at correct Python version as that can be overridden if need be as > part of Apache configuration files and don't have to fiddle Apache > startup files like with mod_python. > > Graham > > > > Thanks > > Normando > > Graham Dumpleton escribió: > > 2008/11/6 Normando Hall <nhall at unixlan.com.ar>: > > > Graham Dumpleton escribió: > > 2008/11/6 Normando Hall <nhall at unixlan.com.ar>: > > > Hello dear. > > I am really neubie with python, so sorry for the questios if it is very > silly. > > I have searched at the list, google, etc, and I can't to get an answer to my > issue. > > I have apache 2.0.x running at my server, and python 2.3.4 and python 2.4.x. > Python 2.3 is the default and I can't to upgrade because use yum and I want > to avoid inconcistenteces at my server in future updates. But some > applications need python 2.4, and then I call directly with "python2.4" > because it is at the path. Python 2.3 is simple "python". > > My question is: Can I use two mod_python (each one compiled under correct > python version) and loaded in apache as two differente modules? For instance > mod_python.so and mod_python2.so. I presume it is not possible. > > Can you give me some light to this issue? > > > No. > > If your applications are WSGI capable, use fastcgi/flup instead. > > Graham > > > > > Hello Graham and thanks for the fast reply. > > I want to use Django and a module named Surftracr for squid reports with web > access. I don't know what mean WSGI, but if you can confim these > applications are WSGI, I will look at fastcgi/flup options. > > > Django can host on FASTCGI so that is okay. I don't know what Surftracr is. > > PS. Please use reply-all and keep discussion on list. > > Graham > > > > > >
|