VectleSkillsselenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

Export

Fixes Selenium failing to start Chrome because the chromedriver binary is not on PATH. Use when `webdriver.Chrome()` raises WebDriverException saying chromedriver needs to be in PATH. Not for import errors or session/version mismatch errors.

Selenium found your code fine, but there is no chromedriver binary it can launch. The modern fix is upgrading to selenium 4.6 or newer, whose built-in Selenium Manager downloads the right driver automatically, so webdriver.Chrome() just works. If you are stuck on an older selenium, install webdriver-manager and pass its driver path explicitly. Either way, stop hand-downloading chromedriver zips.

The error

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

Fix it

  1. Preferred fix: upgrade selenium so Selenium Manager handles the driver
python -m pip install -U selenium
python -c "from selenium import webdriver; d = webdriver.Chrome(); print(d.capabilities['browserVersion']); d.quit()"

Expected: prints your Chrome version and exits cleanly. Selenium 4.6+ ships Selenium Manager, which fetches a matching chromedriver on first run.

  1. If you cannot upgrade, use webdriver-manager
python -m pip install webdriver-manager

Then in code:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))

Expected: the browser opens. webdriver-manager downloads the chromedriver matching your installed Chrome and hands its path to selenium.

  1. Legacy option: put chromedriver on PATH yourself

Download the chromedriver matching your Chrome version, unzip it into a folder on PATH (for example /usr/local/bin), and make it executable (chmod +x). Then webdriver.Chrome() finds it. Expected: chromedriver --version prints a version in a fresh terminal.

When this applies

  • webdriver.Chrome() raises WebDriverException naming chromedriver and PATH
  • you are on selenium older than 4.6, which has no Selenium Manager
  • a fresh machine or container where no driver was ever installed

When it does NOT apply

  • import errors (No module named 'selenium') happen before any of this
  • SessionNotCreatedException: This version of ChromeDriver only supports Chrome version N means a driver WAS found but mismatched
  • cannot find Chrome binary means Chrome itself is missing, not the driver

Compatibility

Selenium Manager (the automatic fix) ships in selenium 4.6+. webdriver-manager works with selenium 3 and 4. The hand-placed binary approach works everywhere but needs the version to match Chrome.

Variant phrasings

Message: 'geckodriver' executable needs to be in PATH

The Firefox equivalent. Same fixes: selenium 4.6+ auto-manages geckodriver too, or GeckoDriverManager from webdriver-manager.

Message: 'msedgedriver' executable needs to be in PATH

The Edge equivalent. Same pattern with EdgeDriverManager.

Why it happens

Selenium drives browsers through a separate driver binary (chromedriver for Chrome), and older selenium versions expected you to install and locate that binary yourself. If no chromedriver is on PATH and none is pointed at explicitly, the launch fails with this message. Selenium 4.6+ eliminated the manual step with Selenium Manager, which is why upgrading is the recommended fix.

Edge cases

  • Corporate networks sometimes block the driver download. Set the proxy env vars before first run, or pre-seed the driver cache.
  • If Chrome auto-updated overnight, a hand-placed chromedriver can go stale and produce the version-mismatch error instead. Selenium Manager re-resolves automatically.
  • On Apple Silicon, make sure the chromedriver arch matches (arm64). A Rosetta-mismatched binary fails to launch.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=selenium.common.exceptions.WebDriverException%3A+Message%3A+%27chromedriver%27+executable+needs+to+be+in+PATH&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.