From the python repl:
import sysconfig
sysconfig.get_config_vars('Py_ENABLE_SHARED')
문제
Environment:
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:
Thank you!
해결책
From the python repl:
import sysconfig
sysconfig.get_config_vars('Py_ENABLE_SHARED')
다른 팁
A bit better is to use
import sysconfig
sysconfig.get_config_var('Py_ENABLE_SHARED')
This returns the integer value 0 or 1 directly. The plural form is used to get multiple values or a whole dict if no argument is given, see https://docs.python.org/3/library/sysconfig.html?highlight=get_config_vars#sysconfig.get_config_vars