Skip to content

Instantly share code, notes, and snippets.

@gzagatti
Last active January 30, 2018 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gzagatti/97adc279e241d8e440100c7c8735054b to your computer and use it in GitHub Desktop.
Save gzagatti/97adc279e241d8e440100c7c8735054b to your computer and use it in GitHub Desktop.
Installing python with pyenv

pyenv was failing to install python due the inexistence of the pyexpat library.

In order to solve this problem, I upgraded brew, installed and uninstalled openssl with brew and installed the HEAD version of pyenv.

Before installing the required python versions I exported the following flags:

CFLAGS="-I$(brew --prefix openssl)/include"
LDFLAGS="-L$(brew --prefix openssl)/lib"

Finally, I installed python 3.5.1 and 2.7.11 with pyenv install -v X.X.X.

pyenv does not work with --enable-framework as it requires root access to symlink the framework to /Application. The workaround is to use pyenv to install conda, which comes with the framework on. This is the case with YouCompleteMe, a plugin for vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment