login community faq

After running the installer (great job btw, the installers really make things easy), i made a bare-bones Django app to setup the static stuff, etc. Anyway, the installer message said it would install python2.7, and apache/wsgi, but i can't find the python executable it said it installed.

On my site I output the python version info (sys.version_info) and path to executable (sys.executable), and it says it's python 2.7, and the executable lives in /usr/local/bin/python ... however, when I SSH into the server and run /usr/local/bin/python to start an interactive prompt, it's using python 2.4.

thanks in advance for you help :)

asked Aug 04 '11 at 08:31

christopherscott's gravatar image

christopherscott
12


Our installer doesn't actually set up a separate Python 2.7 executable - it uses the system Python 2.7 environment.

sys.executable can't be used to determine the Python version under mod_wsgi, since the Python interpreter isn't being used directly.

You can confirm the Python version in use by your mod_wsgi installation as you did with sys.version_info or by running ldd against your mod_wsgi.so, eg:

1
2
[you@webNNN django]# ldd apache2/modules/mod_wsgi.so | grep python
    libpython2.7.so.1.0 => /usr/local/lib/libpython2.7.so.1.0 (0x0068e000)

Hope that helps!

answered Aug 04 '11 at 11:12

seanf's gravatar image

seanf ♦♦
56291220

edited Aug 04 '11 at 11:13

Interesting, never seen "ldd" before. Perfect answers (as usual), thanks so much Sean.

(Aug 04 '11 at 13:09) christopherscott christopherscott's gravatar image

You're very welcome!

(Aug 04 '11 at 13:11) seanf ♦♦ seanf's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×643
×229
×149
×44

Asked: Aug 04 '11 at 08:31

Seen: 1,018 times

Last updated: Aug 04 '11 at 13:11

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited