That will bootstrap
expat and other dependencies properly for both Python 2.7.10 and 3.5.
So here are the steps I took after upgrading my home machine:
# install the CLI tools xcode-select --install # get rid of the old pyenv and freshen up HomeBrew brew uninstall pyenv brew update; brew upgrade; brew cleanup # Install the master branch of pyenv. Keep in mind that # you may have to do some additional cleanup and setup # of env vars if you're migrating from HomeBrew's pyenv git clone https://github.com/yyuu/pyenv.git ~/.pyenv # note: I need brew's libxml2 and libxslt for installing # lxml later, but they are not needed for Python itself, # so you can skip this: brew install libxml2 libxslt pyenv install -v 2.7.10
As a side note, if you want to use uWSGI on your Mac be aware that PyPi hasn’t yet been updated to pick up this fix, so you might want to patch and build it manually (I only need to actually run it on Linux, so of course I just used Docker instead).