Selenium firefox webdriver with virtualenv: Exec format error
<p>I am using Selenium and Virtualenv in Ubuntu14.04 to scrape some code on webpage. After making a virtualenv directory, while activating virtualenv using 
source bin/activate, 
I installed selenium, headless firefox, pyvirtualdisplay and firefox geckodriver.</p>

<p>I installed headless firefox according to <a href="http://scraping.pro/use-headless-firefox-scraping-linux/" rel="nofollow noreferrer">here</a>.</p>

<p>And I also Found out that there are different python2.7 folders at
"/usr/lib/python2.7/" and "~/ladder_selenium/lib/python2.7" (ladder_selenium is the Virtualenv directory)</p>

<p>and after I ran a python code which contains </p>

<pre><code>from selenium import webdriver
</code></pre>

<p>, the error below happens.</p>

<pre><code>Traceback (most recent call last):
  File "predict.py", line 12, in &lt;module&gt;
driver = webdriver.Firefox()
  File "/home/heyjude/ladder_selenium/local/lib/python2.7/site-packages/selenium/webdriver/f
self.service.start()
  File "/home/heyjude/ladder_selenium/local/lib/python2.7/site-packages/selenium/webdriver/c
stdout=self.log_file, stderr=self.log_file)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
</code></pre>

<p>Could you tell me what to fix?</p>

<p>EDIT for the COMMENT BELOW:</p>

<pre><code>(ladder_selenium) heyjude@ladder-selenium:~$ export DISPLAY=:99
(ladder_selenium) heyjude@ladder-selenium:~$ firefox
XPCOMGlueLoad error for file /opt/firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
</code></pre>