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?

Asked By: wow yoo

||

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.

Answered By: Dekel

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.

Answered By: gambarimas87
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.