For example, there're two versions of django (1.1, 1.4) installed on the server, and two versions of python(2.6,2.7) as well. Is there a way to check which version of python/library is being used by WSGI?
(in other words, is there a way to check which interpreter is used to run the scripts under /etc/apache2/wsgis-available/
directory)
In your WSGI application look at the value of mod_wsgi. version in the WSGI environ dictionary. That or import mod_wsgi module in a WSGI application running under mod_wsgi (not command line Python) and print out mod_wsgi. version from that module.
If installing the Apache module by hand, the file is called 'mod_wsgi.so'. The compiled Apache module can be found in the “. libs” subdirectory. The name of the file should be kept the same when copied into its appropriate location.
Used to indicate to Python when it is initialised where its library files are installed.
Running ldd
Or Dependency Walker against the mod_wsgi module will tell you which version of the Python library it was built against.
e.g.
ldd <PATH TO YOUR MOD_WSGI MODULE>/mod_wsgi.so
more documentation here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With