# Python build error

**URL:** <https://discuss.aerospike.com/t/python-build-error/4246>\
**Category:** Python Client\
**Created:** [June 8, 2017, 1:01am UTC](https://discuss.aerospike.com/t/python-build-error/4246 "2017-06-08T01:01:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbulkow](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bbulkow](https://discuss.aerospike.com/u/bbulkow)\
**Post date:** [June 8, 2017, 1:01am UTC](https://discuss.aerospike.com/t/python-build-error/4246/1 "2017-06-08T01:01:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rmarks](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rmarks](https://discuss.aerospike.com/u/rmarks)\
**Post date:** [June 8, 2017, 4:35am UTC](https://discuss.aerospike.com/t/python-build-error/4246/2 "2017-06-08T04:35:12Z")

</div>

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 setup.py file in the Aerospike Python client repo currently sets that variable to ‘10.11’

> <https://github.com/aerospike/aerospike-client-python/blob/master/setup.py#L205>

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 setup.py: `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 setup.py install`

---

<div class="post-metadata">

**Author:** ![bbulkow](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bbulkow](https://discuss.aerospike.com/u/bbulkow)\
**Post date:** [June 8, 2017, 11:06pm UTC](https://discuss.aerospike.com/t/python-build-error/4246/3 "2017-06-08T23:06:49Z")

</div>

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.
