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 04 Aug '11, 08:31

christopherscott's gravatar image

christophers...
12
accept rate: 0%


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:

[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!

link

answered 04 Aug '11, 11:12

seanf's gravatar image

seanf ♦♦
8.0k1726
accept rate: 39%

edited 04 Aug '11, 11:13

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

(04 Aug '11, 13:09) christophers... christopherscott's gravatar image

You're very welcome!

(04 Aug '11, 13:11) seanf ♦♦ seanf's gravatar image
Your answer
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

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×742
×274
×170
×51

Asked: 04 Aug '11, 08:31

Seen: 1,386 times

Last updated: 04 Aug '11, 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