Where does 'sys.exec_prefix' point to?
Question:
I’ve heard two descriptions.One said it points to location of compiled binaries, another believed sys.exec_prefix is the equivalent of sys.prefix, but for platform-specific files, which is correct?
Answers:
According to python-3 documentation:
sys.exec_prefix
A string giving the site-specific directory prefix where the platform-dependent Python files are installed; by default, this is also ‘/usr/local’. This can be set at build time with the –exec-prefix argument to the configure script. Specifically, all configuration files (e.g. the pyconfig.h header file) are installed in the directory exec_prefix/lib/pythonX.Y/config, and shared library modules are installed in exec_prefix/lib/pythonX.Y/lib-dynload, where X.Y is the version number of Python, for example 3.2.
Please take a look at my answer here. It contains what I understood from the Python documentation about sys.exec_prefix
and other related variables.
I’ve heard two descriptions.One said it points to location of compiled binaries, another believed sys.exec_prefix is the equivalent of sys.prefix, but for platform-specific files, which is correct?
According to python-3 documentation:
sys.exec_prefix
A string giving the site-specific directory prefix where the platform-dependent Python files are installed; by default, this is also ‘/usr/local’. This can be set at build time with the –exec-prefix argument to the configure script. Specifically, all configuration files (e.g. the pyconfig.h header file) are installed in the directory exec_prefix/lib/pythonX.Y/config, and shared library modules are installed in exec_prefix/lib/pythonX.Y/lib-dynload, where X.Y is the version number of Python, for example 3.2.
Please take a look at my answer here. It contains what I understood from the Python documentation about sys.exec_prefix
and other related variables.