Homebrew installs in either a default directory (based on factors such as the macOS version installing Homebrew, the Homebrew version being installed, etc.) or a user-specified directory.
Homebrew provides a HOMEBREW_PREFIX environment variable in order to locate where it's installed.
While setup.py takes a few guesses as to where Homebrew is located ([setup.py#L213-L219]), it does not use the environment variable which is likely to have the location:
Issue
Homebrew installs in either a default directory (based on factors such as the macOS version installing Homebrew, the Homebrew version being installed, etc.) or a user-specified directory.
Homebrew provides a
HOMEBREW_PREFIX
environment variable in order to locate where it's installed.While setup.py takes a few guesses as to where Homebrew is located ([setup.py#L213-L219]), it does not use the environment variable which is likely to have the location:
https://github.com/mkleehammer/pyodbc/blob/7b4e27781c7f1b75995ecca73d3018c929f4adef/setup.py#L213-L219
[setup.py#L213-L219]: https://github.com/mkleehammer/pyodbc/blob/7b4e27781c7f1b75995ecca73d3018c929f4adef/setup.py#L213-L219
If the user installed Homebrew in a user-specified directory, setup.py is not able to find Homebrew and fails to run.