-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow HomeBrew installed in a different prefix
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
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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!" | ||
|