Forums

Can't find "geckodriver" in python3 Selenium virtualenv

Hi,

I'm experimenting with Selenium for testing. I've been following your steps in https://blog.pythonanywhere.com/3/

Copying the code from the blog post and running in the default bash shell with python 2.7 the script works just fine.

I want to run python 3.5 inside a virtualenv. I set up a python3.5 virtualenvwrapper and then "workon" into it. Having pip installed selenium and pyvirtualdisplay when I then run exactly the same code (after turning the print statement into python 3 code) I get an error message about the "geckodriver" not being on the PATH. For the life of me I can't find the difference between the two environments. Can you point me in the right direction please?

Thanks,

Dave.

hmm quick thing to check- are you using the same version of selenium? (I believe the newest version of selenium doesn't work)

That fixed it thanks. So obvious when you say it out loud

Installing collected packages: selenium
  Found existing installation: selenium 3.0.2
    Uninstalling selenium-3.0.2:
      Successfully uninstalled selenium-3.0.2
Successfully installed selenium-2.33.0

Hey guys,

I was also getting this error on 3.6, and when I checked the "Batteries Included" page, v3.0.2 is installed by default.

Downgrading to 2.53.6 fixed it, but I wanted to let everyone know the default version for 3.6 doesn't work.

Thanks! That's useful to know, we'll have to downgrade it.