title: Creating an Exe with Selenium Module: Py2exe/Pyinstaller
body: <p>I've looked everywhere. Stackoverflow, various messageboards, the py2exe website, the pyinstaller website...nothing is helping. Including the selenium module, particularly making an exe that supports firefox, seems impossible. I am starting to pull out my hair because using either py2exe and pyinstaller is becoming a huge headache.</p>
  
  <p>Both py2exe and pyinstaller have their share of problems.</p>
  
  <p>My goal is to make <strong>one single exe file</strong>, without any extra directories, so that other people can use my program if they do not have python/modules.</p>
  
  <p>With py2exe, if I create a setup.py file as such</p>
  
  <pre><code>from distutils.core import setup
  import py2exe
  
  setup(
  name='Ask Alfred',
  data_files = [('Drivers', ['Drivers/chromedriver.exe',
               'Drivers/webdriver.xpi','Drivers/webdriver_prefs.json'])],
  version='1.0',
  description='Find emails fast!',
  author='Me',
  windows=[{'script': 'alphy.py'}],
  options={
      'py2exe':
          {
              'skip_archive': False,
              'optimize': 2,
          }
  }
  )
  </code></pre>
  
  <p>it will create an exe in the dist folder and a Drivers folder with the files I need, however, if I try to run the exe it will tell me that it could not find these files (because it is looking for them in the library.zip folder). On top of that, my GUI looks terrible (fonts are now grey instead of black and images with white backgrounds now have grey backgrounds).</p>
  
  <p>With pyinstaller, if I use the "--onefile" flag when creating the exe it does not work at all/neither firefox nor chrome gets started.</p>
  
  <p>With either, I only get workable results if I choose to not archive/not make one file. In that case, pyinstaller delivers a fully working solution.</p>