I am trying to run a script with Selenium and keep getting the error message:
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver': 'geckodriver'
Thus far, I have attempted to remedy it by:
- Installing geckodriver
- Attempting to follow the instructions here to the problem
- That didn't work, so I made sure there was a path to /usr/local/bin, where geckodriver was installed
- Still didn't work, so I moved geckodriver to the path laid out in the error message, which was "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py",
- Still didn't work, so I moved geckodriver to the same folder where the script is saved.
I've been Google searching and watching YouTube videos for a full day, and I've made no progress. Any help would be greatly appreciated.
EDIT:
Code is just the first script from the web scraping chapter in Automate the Boring Stuff:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://inventwithpython.com')