How to install python client on a Mac with python3

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: https://developer.apple.com/download
  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

© 2021 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.