I am trying to use the Selenium WebDriver in a Python 3.5, macOS High Sierra, and Firefox environment. I have not succeeded in installing it. I hence have a question that is related (or even duplicates) questions such as this one here and this one here. Nontheless, I can't make it work.
Her is what I have done so far:
- I installed
selenium
viapip install selenium
.pip freeze
shows that I installedselenium==3.9.0
- I downloaded the gecko driver from https://github.com/mozilla/geckodriver/releases
- I unpacked the package and draged the driver to
/usr/local/bin
. I tried to put it into/usr/bin
but I can't. - I extanded
$PATH
.echo $PATH
yields/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/Users/JohnDoe/anaconda/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
When I run from selenium import webdriver
I am thrown the following error
/Users/JohnDoe/anaconda/lib/python3.5/selenium/webdriver/__init__.py in <module>
No module named 'selenium.webdriver.firefox.webdriver'
Can anybody help?
Edit: This question has been marked as a possible duplicate to the question asked here: Python : no module named selenium. However, I get the depicted error when running from selenium import webdriver
, altough I followed all the steps described.