-
-
Notifications
You must be signed in to change notification settings - Fork 35
Install UBA on macOS Big Sur
In view of a known issue of python with macOS Big Sur (https://github.com/eliranwong/UniqueBible/issues/141), we offer instructions below on installing UBA on macOS Big Sur.
Run the following steps with macOS terminal app.
(please note that some steps below may be optional, but it works on my side.)
- Install Xcode Command Line Tools
xcode-select --install
- Install homebrew (https://brew.sh)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install the python build dependencies and a few other elements (https://github.com/pyenv/pyenv/wiki#suggested-build-environment):
brew install openssl readline sqlite3 xz zlib bzip2 git
- Add bzip2 path
(One may use the following line to check which shell is being used. recent macOS versions use zsh by default, older versions use bash by default):
echo $SHELL
(For bash users)
echo 'export PATH="/usr/local/opt/bzip2/bin:$PATH"' >> ~/.bash_profile
echo 'export LDFLAGS="-L/usr/local/opt/bzip2/lib"' >> ~/.bash_profile
echo 'export CPPFLAGS="-I/usr/local/opt/bzip2/include"' >> ~/.bash_profile
(For zsh users)
echo 'export PATH="/usr/local/opt/bzip2/bin:$PATH"' >> ~/.zshrc
echo 'export LDFLAGS="-L/usr/local/opt/bzip2/lib"' >> ~/.zshrc
echo 'export CPPFLAGS="-I/usr/local/opt/bzip2/include"' >> ~/.zshrc
- Install pyenv (https://github.com/pyenv/pyenv):
brew install pyenv
- Add pyenv path
(for bash user, run)
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
or
(for zsh user, run)
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
-
Restart terminal app (or you may simply open a new tab)
-
Install python 3.7.3 (you may choose other version from version 3.7 or above; read more at: https://github.com/pyenv/pyenv/issues/1643#issuecomment-684050015)
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include"
LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(xcrun --show-sdk-path)/usr/lib"
pyenv install --patch 3.7.3 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch)
- Set pyenv global to 3.7.3 (you may want to set a particular python version only for UBA, rather than global. read more at: https://github.com/pyenv/pyenv):
pyenv global 3.7.3
- Download UBA with git
- Run UBA:
python3 UniqueBible/uba.py