Reputation: 2092
$ brew install pyenv-virtualenv
and append the following to .bash_profile.
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
$ source ~/.bash_profile
and install python.
$ pyenv install 2.7.11
Then the error occured.
zipimport.ZipImportError: can't decompress data; zlib not available
How to solve?
Upvotes: 2
Views: 1311
Reputation: 71
Tried above solution but found this in my google research fixing my issue installing Python 3.6.7 with pyenv https://github.com/pyenv/pyenv/issues/1219
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Hopes that helps!
Upvotes: 1
Reputation: 138
All you have to do is following command.
$ xcode-select --install
Upvotes: 4