Unable to install aerospike client python3 in Mac OSX Sierra (10.12)

python

#1

Have an older version of aerospike client python installed (2.0.0) but getting error on upgrading.

The output for the command sudo pip3 install --upgrade aerospike

Collecting aerospike
  Downloading aerospike-2.0.12.tar.gz (104kB)
Installing collected packages: aerospike
  Found existing installation: aerospike 2.0.0
    Uninstalling aerospike-2.0.0:
      Successfully uninstalled aerospike-2.0.0
  Running setup.py install for aerospike: started
    Running setup.py install for aerospike: finished with status 'error'
    Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-j5zu5nzx/aerospike/setup.py';f=getattr(toke
    info: Executing ./scripts/aerospike-client-c.sh
    info: downloading 'http://www.aerospike.com/download/client/c/4.1.5/artifact/mac' to '/private/tmp/pip-build-j5zu5nzx/aerospike/aerospike-client-c/package/aerospike-client-c.tgz
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   369  100   369    0     0    600      0 --:--:-- --:--:-- --:--:--   600
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    100 41.9M  100 41.9M    0     0  3991k      0  0:00:10  0:00:10 --:--:-- 2376k
    info: extracting 'aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-devel-4.1.5.pkg
    aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-libev-devel-4.1.5.pkg
    aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-libevent-devel-4.1.5.pkg
    aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-libuv-devel-4.1.5.pkg' from 'aerospike-client-c.tgz'
    info: extracting files from 'aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-devel-4.1.5.pkg
    aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-libev-devel-4.1.5.pkg
    aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-libevent-devel-4.1.5.pkg
    aerospike-client-c-4.1.5.mac.x86_64/aerospike-client-c-libuv-devel-4.1.5.pkg'
    11540 blocks
    
    CHECK
       [✓] /private/tmp/pip-build-j5zu5nzx/aerospike/aerospike-client-c/package/usr/local/lib/libaerospike.a
       [✓] /private/tmp/pip-build-j5zu5nzx/aerospike/aerospike-client-c/package/usr/local/include/aerospike/aerospike.h
       [✓] /private/tmp/pip-build-j5zu5nzx/aerospike/aerospike-client-c/package/usr/local/aerospike/client/sys/udf/lua/aerospike.lua
    
    info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h
    info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a
    copying from aerospike-client-c/lua to /usr/local/aerospike/lua
    running install
    running build
    running build_ext
    building 'aerospike' extension
    creating build
    creating build/temp.macosx-10.12-x86_64-3.6
    creating build/temp.macosx-10.12-x86_64-3.6/src
    creating build/temp.macosx-10.12-x86_64-3.6/src/main
    creating build/temp.macosx-10.12-x86_64-3.6/src/main/client
    creating build/temp.macosx-10.12-x86_64-3.6/src/main/query
    creating build/temp.macosx-10.12-x86_64-3.6/src/main/scan
    creating build/temp.macosx-10.12-x86_64-3.6/src/main/llist
    creating build/temp.macosx-10.12-x86_64-3.6/src/main/geospatial
    creating build/temp.macosx-10.12-x86_64-3.6/src/main/global_hosts
    creating build/temp.macosx-10.12-x86_64-3.6/src/main/nullobject
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -Isrc/include -I/usr/local/opt/ope
    error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.11" but "10.12" during configure
    
    ----------------------------------------
  Rolling back uninstall of aerospike
 Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-j5zu5nzx/aerospike/setup.py';f=getattr(tokenize, 'open', open)(__fi

#2
error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.11" but "10.12" during configure

What is in your ~/.bash_profile. Some relevant posts:


#3

cat ~/.bash_profile output

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"

export PATH="/usr/local/apache2/bin:$PATH:/usr/local/sbin:/Users/rahul.parida/Library/Android/sdk/platform-tools:/Users/rahul.parida/Library/Android/sdk/tools"

alias vi="/usr/local/bin/vim"
alias vim="/usr/local/bin/vim"

#export PYTHONHOME="/Users/rahul.parida/anaconda/lib/python3.5"
#export PYTHONPATH=

#export LD_LIBRARY_PATH="/Users/rahul.parida/anaconda/lib:$LD_LIBRARY_PATH"
#export DYLD_LIBRARY_PATH="/Users/rahul.parida/anaconda/lib:$DYLD_LIBRARY_PATH"
#export DYLD_FALLBACK_LIBRARY_PATH="/Users/rahul.parida/anaconda/lib:$HOME/lib:/usr/local/lib:/usr/lib:$DYLD_FALLBACK_LIBRARY_PATH"

#add anaconda path if required
#export PATH="/Users/rahul.parida/anaconda/bin:$PATH"
export PATH=$(brew --prefix openssl)/bin:$PATH

source /usr/local/bin/virtualenvwrapper.sh

I use zsh btw here’s the ouput of ~/.zshrc file

# Path to your oh-my-zsh installation.
export ZSH=/Users/rahul.parida/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(mvn git rails ruby brew autopep8 common-aliases pyenv pylint python  web-search)

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

source $ZSH/oh-my-zsh.sh

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

DISABLE_UPDATE_PROMPT=true

source "/Users/rahul.parida/.bash_profile"

#4

You are sourcing your .bash_profile at the end of your ~/.zshrc file, so you are also using it. What is the output of the following?

$ env | grep MACOSX

You could try setting MACOSX_DEPLOYMENT_TARGET as suggested in the other posts.


#5

The above command doesn’t give any output.

I’ve tried setting MACOSX_DEPLOYMENT_TARGET as “10.12” at the end of ~/.bash_profile and running sudo -E -H pip3 install --upgrade aerospike. But still getting the same error.