Updated to work with pyenv python external libraries, static linking, and Python 3 C api