Error message 'chromedriver' executable needs to be available in the path
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
The error saying 'chromedriver' executable needs to be available in the path means Selenium could not locate a usable ChromeDriver binary. The exact fix depends on your Selenium version, because current Selenium releases can often manage drivers automatically, while older setups still require you to install ChromeDriver yourself or point Selenium to its location.
What the Error Means
ChromeDriver is the WebDriver server that allows Selenium to automate Chrome. When Selenium starts a Chrome session, it needs a driver binary that matches the browser well enough to create that session.
Historically, Selenium expected you to do one of these things manually:
- put
chromedriveronPATH - pass the driver path explicitly
- use a third-party driver manager
That is why the error message mentions PATH. The process simply did not know where to find the executable.
The Modern Fix in Newer Selenium Versions
Recent Selenium releases include Selenium Manager, which can automatically discover, download, and cache the appropriate driver when it is missing. In many current setups, the correct fix is simply:
- upgrade Selenium
- stop manually hard-coding an old driver path
- let Selenium manage the driver
A minimal current Python example is:
If Selenium Manager is working, this can succeed without any manual chromedriver installation.
Explicit Driver Path for Older or Special Environments
If you are on an older Selenium version or in an environment where automatic driver management is unavailable, you can set the path directly.
This is also useful in environments where Selenium Manager cannot resolve the right binary automatically and you need full control.
Using PATH Directly
You can still solve the problem by putting ChromeDriver in a directory that the operating system searches for executables.
On Unix-like shells:
If chromedriver --version works in the shell that launches your tests, Selenium has a better chance of finding it.
The important detail is that the PATH change must apply to the same runtime environment as the test process. Updating your login shell does not automatically fix a CI agent, IDE launcher, or Docker container.
Environment-Specific Issues
This error often shows up in:
- CI pipelines
- Docker images
- remote Linux servers
- fresh virtual environments
In these environments, the browser and driver may both be missing, or the driver may exist but not be executable. A path problem can therefore really be:
- a missing binary
- incorrect file permissions
- incompatible driver version
- a shell startup file that was never loaded
That is why checking PATH alone is sometimes not enough.
Common Pitfalls
The biggest mistake is following old tutorials blindly. Many older examples tell you to download ChromeDriver manually even when the current Selenium release can manage it automatically.
Another problem is mismatched versions. Even if the driver is found, it may still fail later if the Chrome version and driver version are incompatible.
People also assume that changing PATH in one terminal fixes every environment. It does not. IDEs, cron jobs, containers, and CI runners may all use different startup contexts.
Finally, avoid hard-coding a driver path that only exists on one machine unless you truly need a pinned environment. Portable setups are easier to maintain when they rely on managed drivers or explicit configuration via environment variables.
Summary
- The error means Selenium could not locate a usable ChromeDriver binary.
- In modern Selenium versions, upgrading and relying on Selenium Manager is often the simplest fix.
- Older or special environments can still use an explicit
Servicepath or aPATHentry. - Confirm the driver is actually executable and compatible with the installed Chrome version.
- Always debug in the same environment where the tests run, not just in your interactive shell.
Related reading
- Error message error command 'gcc' failed with exit status 1 while installing eventlet
- Error message gradlew command not found
- Error message "No exports were found that match the constraint contract name
- error module file's minimum deployment target is ios8.3 v8.3
- Error Module 'tensorflow' has no attribute 'gfile' error while running tensorflow object detection api tutorial
- Error Network Configuration must be provided when networkMode 'awsvpc' is specified
- Error No Firebase App 'DEFAULT' has been created - call Firebase App.initializeApp
- Error npm WARN package.json No repository field
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.