When I get a chromedriver error in Selenium

When building a crawling environment with Selenium, I got the following error. It is a Mac environment.

selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

It seems that the pass has not passed. Try to specify the location where the chrome driver is saved.

webdriver.Chrome(executable_path='Path with Chrome driver')

It worked on JupyterLab, but it didn't work when I tested it with .py. so Install chromedriver-binary.

pip install chromedriver_binary==chromedriver version

On JupyterLab, prefix it with "!" And like this ↓

!pip install chromedriver_binary==chromedriver version

I will check it.

from selenium import webdriver
import chromedriver_binary
driver = webdriver.Chrome()

So, if Chrome starts up, it's OK for the time being.

The chromedriver will install the one that corresponds to the build of Chrome you are currently using. For example, if Chrome is 84.0.4147.105, it looks like Chrome Driver 84.0.4147.30.

If the major version is different, build SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 85 I get an error like this and it doesn't work.

Recommended Posts

When I get a chromedriver error in Selenium
I get a java.util.regex.PatternSyntaxException when splitting a string in PySpark
I get an error when I put opencv in pyautoGUI
I get a UnicodeDecodeError in mecab-python3
In the Chainer tutorial, I get an error when importing a package. (mock)
I get a KeyError in pyclustering.xmeans
When I get an error with PyInstaller
I can't get the element in Selenium!
A memorandum when I tried to get it automatically with selenium
When I get an error with Pylint in Atom on Windows
I get a can't set attribute when using @property in python
I get a UnicodeDecodeError when running with mod_wsgi
I get an error when I put a Python plugin in Visual Studio Code under the pyenv environment
When I name the file flask.py in Flask, I get Import Error: cannot import name'Flask'
I get a strange window when I use the open directory dialog in Tkinter
[Python] What to check when you get a Unicode Decode Error in Django
I get an Import Error in Python Beautiful Soup
I get an error when trying meinheld + WebSocket + mongodb
BigQuery-If you get a Reason: responseTooLarge error in Python
I can't manipulate iframes in a page with Selenium
When you get an error in python scraping (requests)
I got a Value Error when using JUMAN ++ with PyKNP
I get [Error 2055] when trying to connect to MySQL on Heroku
I tried "How to get a method decorated in Python"
I wrote a script to get a popular site in Japan
When I run pipenv install <package name>, I get a "No matching distribution found for <package name>" error.
When creating a matrix in a list
When writing a program in Python
Get a Boolean in Flask's request
I get an error when trying to install maec 4.0.1.0 with pip
I got an SSL Error when I installed Anaconda in a new environment, so I solved it (Windows10, Anaconda3-2019.10)
I get an OS Error: [Errno 8] Exec format error when running a Flask application with a python command
What to do if you get a must override `get_config` error when trying to model.save in Keras
I get an error with import pandas.
Get a capture of the entire web page in Selenium Python VBA
Where do I stop when I set a breakpoint in a function in GDB (x86)
I want to print in a comprehension
I made a payroll program in Python!
Precautions when pickling a function in python
If you get a Programming Error: (1146, "Table'<table name>' doesn't exist") in Django
I made a Discord bot in Python that translates when it reacts
How to get a stacktrace in python
When you get a cannot assign module before Module.init () call in pytorch
I get a UnicodeDecodeError when trying to connect to oracle with python sqlalchemy
Get a token for conoha in python
I get a Python No module named'encodings' error with the aws command
I get a firewall warning when I start gqlgen's server.go on my Mac
I started Node.js in a virtual environment
I created a password tool in Python.
If you get a no attribute error in boto3, check the version
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if you get a "No versions found" error in pipenv
What I was addicted to when creating a web application in a windows environment
I got an error when trying to run Hello World in Go language
I got an error when I put opencv in python3 with Raspberry Pi [Remedy]
I was in vain because I couldn't get a send parent order with pybitflyer
Output timing is incorrect when standard (error) output is converted to a file in Python
If you get a long error when tabbing an interactive shell with Anaconda
What to do if a version error occurs in the selenium Chrome driver
Linux Ubuntu16.04 I got a little scary error when I ran a command using sudo
Error when installing a module with Python pip