pyvirtualdisplay in Python 3.4

I am trying to use selenium in a Python 3.4 console. In your forums you suggest the use of pyvirtualdisplay but when I run the test code you suggested

from pyvirtualdisplay import Display
from selenium import webdriver
import traceback
browser = None

    display = Display().start()
    browser = webdriver.Firefox()
    print browser.title

except Exception as e:

    if browser is not None:

I get the following message

Traceback (most recent call last):
  File "/home/ramius/", line 1, in <module>
    from pyvirtualdisplay import Display
ImportError: No module named 'pyvirtualdisplay'

Any idea why?

ah- you will have to pip install --user pyvirtualdisplay or install it into your virtualenv. We have it included/installed in python2.7 but not in python3.4

Hello, could you be more specific, Conrad.I have run pip install --user pyvirtualdisplay from bash but it does not work.

Sorry about that, there was a mistake in Conrad's post. For Python 3.4 you need to run

pip3.4 install --user pyvirtualdisplay

...unless you're in a virtualenv that's configured to use Python 3.4 only (in which case pip install pyvirtualdisplay is correct).

There's more information on this help page.

i am getting an error driver = webdriver.phantomjs("/home/naveenvalluru/node_modules/phantomjs/lib/phantom/bin/phantomjs") TypeError: 'module' object is not callable

can you please guide me..............

we don't support phantomjs... more info here:

Hello, fyi pyvirtualenv is still not included in the pyhon3.x versions. Just ran in to this very issue.

Do you mean pyvirtualdisplay? In that case, you are correct.