I am trying to initiate a web automation project on my Mac, but I’m struggling with the Chrome Driver setup. I keep getting "developer cannot be verified" errors or "path not found" exceptions when I try to run my Python scripts. Should I be manually moving the binary to /usr/local/bin, or is there a more modern way to manage these drivers automatically to ensure they always match my current Chrome browser version?
3 answers
The most efficient way to handle this on MacOS is using the webdriver-manager library, which eliminates the need to manually download binaries. Simply run pip install webdriver-manager and then initialize your driver with Service(ChromeDriverManager().install()). If you prefer the manual route, you must download the version matching your browser from the official Chrome for Testing dashboard. After moving the binary to /usr/local/bin, you often need to run xattr -d com.apple.quarantine /usr/local/bin/chromedriver in the terminal to bypass the MacOS security gatekeeper that blocks unidentified developers.
Are you using an Intel-based Mac or the newer Apple Silicon M1/M2/M3 chips, as downloading the wrong architecture version of the binary is a common cause for the driver failing to execute?
I always use Homebrew for this. Just run brew install --cask chromedriver and it sets the paths for you. It’s much cleaner than dragging files into hidden system folders manually.
I agree with Susan. Homebrew is definitely the way to go for Mac users. Just remember that if Chrome updates automatically, you might need to run brew upgrade to keep the driver in sync with the browser app.
That’s a great point, Michael. I am on an M2 Macbook Air. If I accidentally downloaded the x64 version instead of the arm64 version, would the error message explicitly mention architecture mismatch, or would it just give me a generic "service reached unexpected status" error? I want to make sure I’m looking at the right logs before I start moving files around in my system directories again.