# Aerospike Python Client 2.0: Support for Python 3

**URL:** <https://discuss.aerospike.com/t/aerospike-python-client-2-0-support-for-python-3/2966>\
**Category:** Python Client\
**Created:** [May 19, 2016, 12:43am UTC](https://discuss.aerospike.com/t/aerospike-python-client-2-0-support-for-python-3/2966 "2016-05-19T00:43:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mnemaudsyne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mnemaudsyne/32/200_2.png) [@Mnemaudsyne](https://discuss.aerospike.com/u/Mnemaudsyne)\
**Post date:** [May 19, 2016, 12:43am UTC](https://discuss.aerospike.com/t/aerospike-python-client-2-0-support-for-python-3/2966/1 "2016-05-19T00:43:17Z")

</div>

Posted on March 7, 2016

Written by Jeff Boone (@jboone100), Sr. Engineer at Aerospike

The 2.0 version of the Aerospike Python client is a major release: it adds support for Python 3. Therefore, the client software is now compatible with Python versions 2.6, 2.7, 3.4 and 3.5. For those of you migrating your application from Python 2 to Python 3, there are a few key differences between the two versions to keep in mind as you work through porting the software to the next version.

Please click [here](http://www.aerospike.com/blog/aerospike-python-client-2-0-support-for-python-3/) for the full text of the blog post.

---

<div class="post-metadata">

**Author:** ![Mnemaudsyne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mnemaudsyne/32/200_2.png) [@Mnemaudsyne](https://discuss.aerospike.com/u/Mnemaudsyne)\
**Post date:** [May 19, 2016, 12:43am UTC](https://discuss.aerospike.com/t/aerospike-python-client-2-0-support-for-python-3/2966/2 "2016-05-19T00:43:33Z")

</div>



---

<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:** [January 13, 2017, 6:46am UTC](https://discuss.aerospike.com/t/aerospike-python-client-2-0-support-for-python-3/2966/3 "2017-01-13T06:46:18Z")

</div>

Because of the non-backward compatible python and python3 issues, I am typically installing python2 as ‘python’ and python3 as ‘python3’. I am not using ‘virtualenv’ but I do have pip3 installed.

When I run ‘pip3 install aerospike’ ( as root ) I get the following:

… … … … 100% 7.76M=9.7s\n\n2017-01-13 06:41:24 (4.29 MB/s) - ‘/tmp/pip-build-20woxx5v/aerospike/aerospike-client-c/package/aerospike-client-c.tgz’ saved [43564522/43564522]\n\ninfo: extracting ‘aerospike-client-c-4.1.1.debian7.x86\_64/aerospike-client-c-libev-devel-4.1.1.debian7.x86\_64.deb\naerospike-client-c-4.1.1.debian7.x86\_64/aerospike-client-c-devel-4.1.1.debian7.x86\_64.deb\naerospike-client-c-4.1.1.debian7.x86\_64/aerospike-client-c-libuv-devel-4.1.1.debian7.x86\_64.deb’ from ‘aerospike-client-c.tgz’\ninfo: extracting files from ‘aerospike-client-c-4.1.1.debian7.x86\_64/aerospike-client-c-libev-devel-4.1.1.debian7.x86\_64.deb\naerospike-client-c-4.1.1.debian7.x86\_64/aerospike-client-c-devel-4.1.1.debian7.x86\_64.deb\naerospike-client-c-4.1.1.debian7.x86\_64/aerospike-client-c-libuv-devel-4.1.1.debian7.x86\_64.deb’\n\nCHECK\n [\u2713] /tmp/pip-build-20woxx5v/aerospike/aerospike-client-c/package/usr/lib/libaerospike.a\n [\u2713] /tmp/pip-build-20woxx5v/aerospike/aerospike-client-c/package/usr/include/aerospike/aerospike.h\n [\u2713] /tmp/pip-build-20woxx5v/aerospike/aerospike-client-c/package/opt/aerospike/client/sys/udf/lua/aerospike.lua\n\ninfo: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h\ninfo: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a\ncopying from aerospike-client-c/lua to /usr/local/aerospike/lua\nrunning install\nrunning build\nrunning build\_ext\nbuilding ‘aerospike’ extension\ncreating build\ncreating build/temp.linux-x86\_64-3.4\ncreating build/temp.linux-x86\_64-3.4/src\ncreating build/temp.linux-x86\_64-3.4/src/main\ncreating build/temp.linux-x86\_64-3.4/src/main/client\ncreating build/temp.linux-x86\_64-3.4/src/main/query\ncreating build/temp.linux-x86\_64-3.4/src/main/scan\ncreating build/temp.linux-x86\_64-3.4/src/main/llist\ncreating build/temp.linux-x86\_64-3.4/src/main/geospatial\ncreating build/temp.linux-x86\_64-3.4/src/main/global\_hosts\ncreating build/temp.linux-x86\_64-3.4/src/main/nullobject\nx86\_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D\_FORTIFY\_SOURCE=2 -fPIC -Isrc/include -I/usr/local/opt/openssl/include -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -I/usr/include/python3.4m -c src/main/aerospike.c -o build/temp.linux-x86\_64-3.4/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -Wno-strict-prototypes -march=nocona -D\_FILE\_OFFSET\_BITS=64 -D\_REENTRANT -D\_GNU\_SOURCE -rdynamic -finline-functions -DMARCH\_x86\_64\nsrc/main/aerospike.c:17:20: fatal error: Python.h: No such file or directory\n #include \<Python.h\>\n ^\ncompilation terminated.\nerror: command ‘x86\_64-linux-gnu-gcc’ failed with exit status 1\n\n----------------------------------------" Arguments: () Command “/usr/bin/python3 -u -c “import setuptools, tokenize; **file** =‘/tmp/pip-build-20woxx5v/aerospike/setup.py’;f=getattr(tokenize, ‘open’, open)( **file** );code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, **file** , ‘exec’))” install --record /tmp/pip-k6qaxumf-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-20woxx5v/aerospike/

---

<div class="post-metadata">

**Author:** ![jboone100](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jboone100](https://discuss.aerospike.com/u/jboone100)\
**Post date:** [January 13, 2017, 7:03am UTC](https://discuss.aerospike.com/t/aerospike-python-client-2-0-support-for-python-3/2966/4 "2017-01-13T07:03:16Z")

</div>

Python.h comes from the python-dev package. Use brew, or however you installed python to install the python3-dev package.
