On 18 February 2011 03:31, scabbage <[email protected]> wrote:
> System:
>
> RHEL5 2.6.18-194.el5 x86_64
>
> The OS came with python 2.4. I compiled python 2.7:

If you can compile Python 2.7, then you can compile mod_wsgi from
source code as well.

So, remove the mod_wsgi RPM.

Go back and look at how you compiled Python 2.7. If you didn't use the
'--enable-shared' option to the 'configure' script when you built it,
clean the source (make distclean), rerun configure with same arguments
you used before plus '--enabled-shared'. Build and install Python.

When you build mod_wsgi use the '--with-python' option as documented
in the installation instructions for mod_wsgi in the README included
with the source code or on the wiki.

Note that if Python 2.7 is installed in non standard location and lib
directory not in standard shared library search path, you will need to
tell mod_wsgi where it is when building. Thus, if Python 2.7 was
installed with prefix of /usr/local, in mod_wsgi source you would do:

  ./configure --with-python=/usr/local/bin/python2.7
  LD_RUN_PATH=/usr/local make
  sudo make install

Not these assumed you have appropriate httpd-dev package installed.

If someone knows where to get RHEL5 binary RPMs for Python 2.7 please
do tell. I could see any in IUS repository.

Graham


> -----------------
> # python
> Python 2.7.1 (r271:86832, Feb 15 2011, 17:09:17)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>>
> ----------------
>
> I downloaded and installed the following:
>
> mod_wsgi-3.2-1.el5.x86_64.rpm
>
>
> But it used python 2.4 instead. I read the documentation about this
> and seems that an option is to compile mod_wsgi from source.
>
> Is there a way to keep my RPM installation and config it to use python
> 2.7?
>
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/modwsgi?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to