How to install python client on a Mac with python3

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

How to install python client on a Mac with python3

Install the xcode command line tools

$ xcode-select --install

Follow the below if you see this: “Can’t install the software because it is not currently available from the Software Update server”

  1. Using safari, access: Sign In - Apple
  2. Accept the developer agreement
  3. Search for and download “Command Line Tools for Xcode XX”, where XX is the largest number (latest xcode tools)
  4. Install the tools from dmg in a standard way

Install homebrew

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install openssl 1.0.2*

$ brew install https://aerospike-fd.s3-us-west-1.amazonaws.com/knowledge-base/openssl.rb

Install the Aerospike python client

$ pip3 install aerospike

Test library loads

$ echo "import aerospike" | python3

Notes

Instead of installing the python3 aerospike client library directly on a Mac, you can utilize docker containers. VSCode for example supports deploying, tracing and testing in local and remote docker containers. For further information, refer to the Visual Studio - Containerized App Debugging documentation.

The Dockerfile example below creates an image with the Aerospike python3 library compiled in:

FROM ubuntu:20.04
RUN apt-get update && apt-get -y install python3 python3-pip build-essential curl libssl-dev
RUN pip3 install --upgrade wheel setuptools && pip3 install aerospike

Keywords

PIP PIP3 CLIENT LIBRARY OPENSSL MAC OSX APPLE

Timestamp

December 2020