Re: [modwsgi] mod_wsgi specify python version

125 views
Skip to first unread message

Gery Herbozo

unread,
Sep 11, 2012, 1:57:13 PM9/11/12
to mod...@googlegroups.com
Hello Cato,

you have only python?? that would correspond to some version of it,
try in your shell:

which python
python -V
ll /usr/bin/python*

then post the result. To install with python2.7 you just have to
install with python2.7 instead of using only python, but they may be
the same, I'd suggest you to test first the commands above.

Hope this helps,

Gery


On 11 September 2012 11:40, Cato Yeung <cato....@gmail.com> wrote:
> Dear Experts,
> I have install two version python in my system, python and python2.7.
> I want my mod_wsgi use python2.7 but not python. How can I do that?
>
> Cheers,
> Cato
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/gDIF0g7LaFwJ.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to
> modwsgi+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.

Cato Yeung

unread,
Sep 13, 2012, 12:26:21 AM9/13/12
to mod...@googlegroups.com
Actually both versions are 2.7.
But the first one is installed without enable shared and another is without. (I forgot which one)
I installed two version of them because some packages need python with enable shared (mod_wsgi, PIL, etc)
However, now I found that one can install mod_wsgi but not PIL.
Another can install PIL but not mod_wsgi. (So interesting!)
Now I just want both library works now.
When I install mod_wsgi with python2.7, the following error occurs:
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
When I install PIL with python, the same error occurs.
But I am sure one of them is installed with enable shared.

Cheers,
Cato

Gery Herbozo

unread,
Sep 13, 2012, 4:32:11 AM9/13/12
to mod...@googlegroups.com
are you trying in 32-bit or 64-bit? I installed recently 2.7 in rhel5
32-bit and as far I remember didnt have any problems, but 64-bit is
almost always problematic.
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/ET-tmaj8wckJ.

Cato Yeung

unread,
Sep 13, 2012, 5:12:36 AM9/13/12
to mod...@googlegroups.com
Grey,
my computer and python are both 64bit...
Is there any solution to this?
Cheers,
Cato

Gery Herbozo

unread,
Sep 13, 2012, 5:04:16 PM9/13/12
to mod...@googlegroups.com
there is, you have to install it with some flags, depending on the
error message you get, based on this message:
/usr/local/lib/libpython2.7.a, it should be in /usr/local/lib64 as far
I know, this should be one flag (I think), I've read about this point
in php, without pointing to this, it's normally to receive "unable to
share...." messages. The Bad Value you received, it seems that it's
related to some missing package in your OS, which OS do you use?
search for "install python 2.7<your OS>" in google
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/EgQ0ynvWy6MJ.

Cato Yeung

unread,
Sep 14, 2012, 3:46:31 AM9/14/12
to mod...@googlegroups.com
Grey,
Problem solved. I copied my libpython2.7.a to /usr/local/lib/libpython2.7.a and install PIL package to solve this problem.
Cheers,
Cato

Graham Dumpleton

unread,
Sep 14, 2012, 12:45:18 PM9/14/12
to mod...@googlegroups.com
Using .a files when using mod_wsgi is bad. Can't respond at present properly as traveling.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/8GghL_Sia5MJ.

Gery Herbozo

unread,
Sep 14, 2012, 3:28:19 PM9/14/12
to mod...@googlegroups.com
cool Cato, enjoy it
Reply all
Reply to author
Forward
0 new messages