title: Path issues with Selenium and Geckodriver
body: <p>I am new to programing, did some python courses and am trying to apply what I've been learning.</p>
  
  <p><strong>I am running a macOS Sierra and have python2 and 3 installed in my machine</strong>, even though I just wanted to use the python3, but my previous course had instructed me to start with python2, which I don't know if it was a bad thing.</p>
  
  <p>Anyway, taking the Automate the Boring Stuff with Python course (which uses python3) I ran into this code:</p>
  
  <pre><code>#! python3
  from selenium import webdriver
  browser = webdriver.Firefox()
  </code></pre>
  
  <p>and got the following error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 64, in start
      stdout=self.log_file, stderr=self.log_file)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in __init__
      restore_signals, start_new_session)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/Users/Alex/Anaconda/Templates/selenium_firefox.py", line 3, in &lt;module&gt;
      browser = webdriver.Firefox()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 135, in __init__
      self.service.start()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 71, in start
      os.path.basename(self.path), self.start_error_message)
  selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 
  
  Exception ignored in: &lt;bound method Service.__del__ of &lt;selenium.webdriver.firefox.service.Service object at 0x1029777f0&gt;&gt;
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 163, in __del__
      self.stop()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 135, in stop
      if self.process is None:
  AttributeError: 'Service' object has no attribute 'process'
  [Finished in 0.501s]
  </code></pre>
  
  <p>I found an answer that seems to solve my problem here:
  <a href="https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path">Selenium using Python - Geckodriver executable needs to be in PATH</a></p>
  
  <p>But I can't quite understand how to manipulate PATHs in my computer or how to organize my files in a way that the computer works.</p>
  
  <p>I executed the following code on my terminal (as instructed in the other query): 
  <strong>exportPATH=$PATH:/path/to/directory/of/executable/downloaded/in/previous/step</strong></p>
  
  <p>But it does not make any sense to me nor did it work. I also tried taking the Geckodriver file from the downloads (where it was originally) and placing it inside my Anaconda folder.</p>
  
  <p>Anyway, I am quite sure the problem is that I don't really know how the computer organize itself, thus cannot properly address the code.</p>
  
  <p>Therefore, <strong>I would like to ask a solution for my specific case and a reference text, tutorial, video or anything alike that I could use to better understand how all this works</strong> (I still didn't find any good material on that matter).</p>
  
  <p>Thanks in advance!</p>