     [Answers](https://scrapfly.io/blog)   /  [python](https://scrapfly.io/blog/tag/python)   /  [Selenium: chromedriver executable needs to be in PATH?](https://scrapfly.io/blog/answers/selenium-chromedriver-in-path)   # Selenium: chromedriver executable needs to be in PATH?

 by [Bernardas Alisauskas](https://scrapfly.io/blog/author/bernardas) Dec 19, 2022 1 min read [\#python](https://scrapfly.io/blog/tag/python) [\#selenium](https://scrapfly.io/blog/tag/selenium) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fselenium-chromedriver-in-path "Share on LinkedIn")    

 

 

Selenium is a popular web browser automation library used for web scraping. To run, however, Selenium needs special web browser executables called drivers. For example, to run Chrome web browser Selenium needs [chromedriver](https://sites.google.com/chromium.org/driver/) to be installed. Without it a generic exception will be raised:

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



This can also mean that the chromedriver is installed but Selenium can't find it. To fix this the chromedriver location should be added to the `PATH` environment variable:

shell```shell
$ export PATH=$PATH:/location/where/chromedriver/is/
```



Alternatively, we can specify the driver directly in the Selenium initiation code:

python```python
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'your\path\chromedriver.exe')
driver.get('https://scrapfly.io/')
```





 

    



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

## Explore this Article with AI

 [ ChatGPT ](https://chat.openai.com/?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fselenium-chromedriver-in-path) [ Gemini ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fselenium-chromedriver-in-path) [ Grok ](https://x.com/i/grok?text=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fselenium-chromedriver-in-path) [ Perplexity ](https://www.perplexity.ai/search/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fselenium-chromedriver-in-path) [ Claude ](https://claude.ai/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fselenium-chromedriver-in-path) 



 ## Related Articles

 [  

 python nodejs 

### How to use Headless Chrome Extensions for Web Scraping

In this article, we'll explore different useful Chrome extensions for web scraping. We'll also explain how to install Ch...

 

 ](https://scrapfly.io/blog/posts/how-to-use-browser-extensions-with-playwright-puppeteer-and-selenium) [  

 python blocking 

### Web Scraping Without Blocking With Undetected ChromeDriver

In this tutorial we'll be taking a look at a new popular web scraping tool Undetected ChromeDriver which is a Selenium e...

 

 ](https://scrapfly.io/blog/posts/web-scraping-without-blocking-using-undetected-chromedriver) [  

 http 

### What is HTTP 406 Error? (Not Acceptable)

HTTP status code 406 generally means wrong Accept- header family configuration. Here's how to prevent it.

 

 ](https://scrapfly.io/blog/posts/what-is-http-error-406-not-acceptable) 

  ## Related Questions

- [ Q Selenium: geckodriver executable needs to be in PATH? ](https://scrapfly.io/blog/answers/selenium-geckodriver-in-path)
- [ Q How to save and load cookies in Selenium? ](https://scrapfly.io/blog/answers/how-to-save-and-load-cookies-in-selenium)
- [ Q How to get page source in Selenium? ](https://scrapfly.io/blog/answers/how-to-get-page-source-in-selenium)
- [ Q How to find elements by XPath in Selenium ](https://scrapfly.io/blog/answers/how-to-find-elements-by-xpath-in-selenium)
 
  



   



 Run headless browsers at scale, **1,000 free credits** [Start Free](https://scrapfly.io/register)