Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Selenium error on geckodriver

📅 2016-Oct-18 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ error, firefox, selenium ⬩ 📚 Archive

Problem

I updated Ubuntu packages, which included Firefox and I updated Selenium using pip3 cause that also depends on the Firefox version. But running my existing Python scripts that use Selenium popped this error:

FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'

Solution

Firefox now provides the geckodriver as a separate binary. You can download the version matching your OS and CPU here. Unzip the file and place the binary anywhere that is in your PATH. Your Python scripts should work now.

Reference

Tried with: Firefox 49, Selenium 3.0.1 and Ubuntu 16.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧