Skip to content

Instantly share code, notes, and snippets.

@empeje
Last active November 19, 2022 14:56
Show Gist options
  • Save empeje/fd7b654b2e57e33f74b833fedcd5f51e to your computer and use it in GitHub Desktop.
Save empeje/fd7b654b2e57e33f74b833fedcd5f51e to your computer and use it in GitHub Desktop.
Setup pyenv in fish shell

Setup pyenv

Required dependencies

brew install pyenv
brew install zlib
brew install sqlite

Required

I'm using fish shell, I'm putting the config below in my ~/.config/fish/config.fish

# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
pyenv init - | source
pyenv rehash >/dev/null ^&1

# build python
# For compilers to find zlib and sqlite you may need to set:
export LDFLAGS="$LDFLAGS -L/usr/local/opt/zlib/lib"
export LDFLAGS="$LDFLAGS -L/usr/local/opt/sqlite/lib"
export CPPFLAGS="$CPPFLAGS -I/usr/local/opt/zlib/include"
export CPPFLAGS="$CPPFLAGS -I/usr/local/opt/sqlite/include"
# For pkg-config to find zlib and sqlite you may need to set:
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH /usr/local/opt/zlib/lib/pkgconfig"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH /usr/local/opt/sqlite/lib/pkgconfig"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment