====== pyenv and MacPorts (Updated) ====== I've recently switched from [[https://brew.sh|HomeBrew]] to [[https://macports.org|MacPorts]] for a number of reasons. MacPorts doesn't have a version of [[https://github.com/pyenv|pyenv]] included, so it needs to be installed manually. I kept running into issues where ''pyenv doctor'' would fail because of missing libraries/dependencies. The following fixed it: sudo port install libffi libxml2 openssl readline sqlite3 xz zlib export CPPFLAGS="-I/opt/local/include $CPPFLAGS" export LDFLAGS="-L/opt/local/lib $LDFLAGS" ===== Update ===== For some reason, I had no luck with the ''pyenv'' route, nor the MacPorts Python installations as Python 3.10, 3.11 and 3.12 kept crashing upon quit (or when running Jupyter notebooks). I removed ''pyenv'' and the MacPorts Python versions and installed the bog-standard official Python release from [[https://python.org|Python.org]] with ''pip install --user'' in userspace. All seems to be fine since. ~~DISCUSSION~~