Skip to content

Instantly share code, notes, and snippets.

@startergo
Last active October 14, 2023 17:36
Show Gist options
  • Save startergo/506893b371344504438ab4baa48388ab to your computer and use it in GitHub Desktop.
Save startergo/506893b371344504438ab4baa48388ab to your computer and use it in GitHub Desktop.
Install Pyenv with Macports
  • Install Macports.
  • Install python dependencies:
sudo port install pkgconfig openssl zlib xz gdbm tcl tk +quartz sqlite3 sqlite3-tcl
  • Install python:
GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \
GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \
pyenv install 3.11.5

PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='$(pkg-config tk tcl --cflags)' \
                       --with-tcltk-libs='$(pkg-config tk tcl --libs)'" \
                       pyenv install 2.7.18

  • For HomeBrew install these:
brew install pkg-config [email protected] [email protected] xz gdbm tcl-tk readline sqlite zlib 

GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
pyenv install 3.11.5
PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='$(pkg-config tk tcl --cflags)' \
                       --with-tcltk-libs='$(pkg-config tk tcl --libs)'" \
                       pyenv install 2.7.18
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment