Web scraping with selenium works fine on my mac local machine but when I push to live Ubuntu server, I get the following error
JavaScript
x
2
1
Could not get version for Chrome with this command: google-chrome --version || google-chrome-stable --version
2
when I try to run
JavaScript
1
6
1
from webdriver_manager.chrome import ChromeDriverManager
2
3
chrome_options = Options()
4
chrome_options.add_argument("--headless")
5
driver = webdriver.Chrome(ChromeDriverManager().install(), options=chrome_options)
6
The code is deployed on AWS ec2 instance
Advertisement
Answer
As stated by @gore in the comments installing chromium-chromedriver on ubuntu server worked for me
On Ubuntu 20.04
JavaScript
1
4
1
pip install selenium
2
sudo apt-get update
3
sudo apt install chromium-chromedriver
4