Python build error


I am getting the following error from both a pip install, and a build from the repo:

error: $MACOSX_DEPLOYMENT_TARGET mismatch: now “10.11” but “10.12” during configure

My mac is 10.12.5, my python is 3.6.1, and I am using pyenv.

Anyone else seeing this?


That error is generally caused by a setup script using distutils attempting to set the $MACOSX_DEPLOYMENT_TARGET environment variable to a value lower than the value which was set during the compilation of the Python running the script.

The file in the Aerospike Python client repo currently sets that variable to ‘10.11’

and I believe that is what is causing the error when attempting to build it from there.

The first fix I would try is to change the line in os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.11' to os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.12'

and try to rerun the build command e.g. python install


Changing that character seems to work. At least, the module compiles now. I will attempt to use the client and see if it works — will let you know.