0

I recently switched from Windows to Mac OS for my work computer and while the interactive window functions normally most of the time it is unable to view items on my path variable throwing the error "WebDriverException: Message: 'geckodriver' executable needs to be in PATH." I say it cannot view the path because when I run a simple script in any other terminal, even the integrated one, it works fine. I know I can work without the interactive window however for my purposes the data viewer is a very handy tool.

I have tried running:

os.system('echo $PATH')

in the interactive window as well as:

os.system('export PATH=$PATH:/path/to/geckdriver/install/location')

With the return of both being: 0

I have also tried switching it to all the different env's I have but it makes no difference.

I have also used brew to install geckodriver with no change.

If you have a solution or idea about what I could be doing wrong I would be very grateful. I have also confirmed that the interactive window still works on my windows machine when running geckodriver/selenium scripts.

Sample Code:

from selenium import webdriver
driver = webdriver.Firefox()
driver.get('https://www.google.ca')
Jeff Linahan
  • 3,775
  • 5
  • 37
  • 56
  • and you tried this : https://stackoverflow.com/a/43221311/7548672 ? –  Apr 18 '20 at 00:49
  • I actually saw that post and had explored that route with it providing a temporary solution. Upon revisiting it though I noticed that the issue was that geckodriver was being flagged by my companies security and removed. Once that was dealt with the solution you linked worked perfectly! Thank you VIctor, have a great weekend! – DarkwingDuck Apr 18 '20 at 22:07

0 Answers0