7

Environment:

  • Mac OS X 10.8.5
  • Apache 2.2.26
  • Homebrew Python 3.3.3

Problem:

I am trying to install mod_wsgi but first need to determine if Python was configured and compiled with the '--enable-shared' option.

Questions:

  1. How can I determine if Homebrew installed Python with the '--enable-shared' option?
  2. If it was not installed, what is the correct way to install it?

Thank you!

fire_water
  • 1,351
  • 1
  • 18
  • 32
  • 1
    http://stackoverflow.com/questions/10192758/how-to-get-a-list-of-options-that-python-was-compiled-with - This works with python 3. – Ian Laird Apr 21 '14 at 16:36
  • 1
    The ``--enable-shared`` option will not be relevant if Python was installed as a MacOS X style framework. – Graham Dumpleton Apr 21 '14 at 22:46

1 Answers1

9

From the python repl:

import sysconfig
sysconfig.get_config_vars('Py_ENABLE_SHARED')
Ian Laird
  • 412
  • 2
  • 8
  • thanks! 'print(sysconfig.get_config_vars('Py_ENABLE_SHARED'))' returned 'SyntaxError: invalid syntax' but just 'sysconfig.get_config_vars('Py_ENABLE_SHARED')' returned '[0]', which I'm assuming means false / "this feature is not enabled". – fire_water Apr 21 '14 at 18:08
  • Correct, it is a boolean return so, you are correct. The feature is not enabled. I will fix the syntax error. – Ian Laird Apr 21 '14 at 20:26