Skip to content

Commit

Permalink
Allow HomeBrew installed in a different prefix
Browse files Browse the repository at this point in the history
Not everyone has HomeBrew installed in /opt/homebrew. This uses the `brew --prefix`, which is the official way to get the prefix.
  • Loading branch information
jaminmc authored Feb 7, 2025
1 parent ff357f2 commit 62bf0b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ if [ "$(uname)" = "Darwin" ]; then
if [ "$python_version" = "3.9" ]; then
log_message "Python 3.9 detected. Installing Python 3.10 using Homebrew..."
brew install [email protected]
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="$(brew --prefix)/opt/[email protected]/bin:$PATH"
elif [ "$python_version" != "3.10" ]; then
log_message "Unsupported Python version detected: $python_version. Please use Python 3.10."
exit 1
Expand All @@ -172,7 +172,7 @@ if [ "$(uname)" = "Darwin" ]; then
brew install faiss
export PYTORCH_ENABLE_MPS_FALLBACK=1
export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0
export PATH="/opt/homebrew/bin:$PATH"
export PATH="$(brew --prefix)/bin:$PATH"
elif [ "$(uname)" != "Linux" ]; then
log_message "Unsupported operating system. Are you using Windows?"
log_message "If yes, use the batch (.bat) file instead of this one!"
Expand Down

0 comments on commit 62bf0b4

Please sign in to comment.