How do I install Geckodriver?
- You can download the geckodriver
- unzip it
- Copy that .exe file and put your into python parent folder (e.g.,
C:\Python34
) - write your scripts.
It will execute successfully.
The easiest way if you are on windows:
driver = webdriver.Firefox(executable_path=r'[Your path]\geckodriver.exe')
Example:
driver = webdriver.Firefox(executable_path=r'D:\geckodriver.exe')
There is an easy way to install Geckodriver:
Install
webdrivermanager
withpip
pip install webdrivermanager
Install the driver for Firefox and Chrome
webdrivermanager firefox chrome --linkpath /usr/local/bin
Or install the driver only for Firefox
webdrivermanager firefox --linkpath /usr/local/bin
Or install the driver only for Chrome
webdrivermanager chrome --linkpath /usr/local/bin