Installing the Aerospike Python Client
The Aerospike Python Client uses the Aerospike C Client. It is available as a 64-bit Linux variant, and for 64-bit OS X 10.9 and above.
Use this guide when installing the Aerospike Python SDK.
Aerospike Python Client 5.x must be used with Aerospike server 4.9 or greater.
- If using the latest aerospike python client (>=3.8.0) and pip (>=19.0) on a linux system, only pip is required to install a pre-built manylinux2010 wheel. In this case, install pip if needed, then skip to the installation section.
- The Aerospike C client. The pip program satisfies this dependency by downloading the appropriate version of the client.
- The Python development package.
RedHat and CentOS (yum)
The following are dependencies for RedHat Enterprise (RHEL) 6.x, 7.x, CentOS 6.x, 7.x, and related distros using the yum package manager.
sudo yum install python-devel
sudo yum install openssl-devel
sudo yum install epel-release
sudo yum install python-pip
Debian and Ubuntu (apt)
The following are dependencies for Ubuntu 18.04+, Debian 9, 10, and related distributions using the apt package manager.
sudo apt-get install python-dev
sudo apt-get install libssl-dev
sudo apt-get install python-pip
sudo apt-get install zlib1g-dev
OS X does not have command line tools. On Mavericks (OS X 10.9) and higher install command line tools without Xcode.
xcode-select --install # install the command line tools, if missing
sudo easy_install pip
Install the dependencies using the OS X Homebrew package manager.
brew install openssl
Use the following code snippet to install the Aerospike Python client:
pip install aerospike
or specify a client version (ie: 4.0.0 to connect to servers < 4.9)
pip install aerospike==<Aerospike Python Version>
Attempting to install the client with pip for the system default Python may cause permissions issues when copying necessary files. In order to avoid those issues, the client can be installed for the current user only by specifying "--user" option:
pip install --user aerospike
For linux installations with aerospike python client version >= 3.8.0, can force an installation from a source build instead of manylinux2010 wheel download by running the following command:
pip install aerospike --no-binary :all: