7

I installed python3-selenium apt package on Ubuntu 16.04. While installing, got a message:

Suggested packages:
  chromedriver firefoxdriver
The following NEW packages will be installed:
  python3-selenium

When I try to run test cases in python3-django, I get the following error:

FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/firefoxdriver/webdriver.xpi'

I did searching for packages name firefoxdriver in Ubuntu repositories but none exist.

Any help with installing the webdrivers appreciated.

  • 1
    You might consider asking on http://askubuntu.com or http://superuser.com but as far as I can tell this has nothing to do with programming, and doesn't even seem relevant to `selenium` (or python or django) – Tadhg McDonald-Jensen May 10 '16 at 21:33

1 Answers1

4

I'm not sure how to install the Firefox webdriver after installing the python3-selenium package.

You could install using pip instead, ideally in a virtual environment.

If you have Firefox installed and you run pip install selenium in your virtual environment, you should be good to go.

Alasdair
  • 298,606
  • 55
  • 578
  • 516
  • I installed selenium via ubuntu python3-selenium package. Is there any way to install the firefox webdriver for this? Or, are you suggesting to install via pip instead? – shishirjaiswal May 14 '16 at 19:18
  • 1
    Worked for me too. Small remark : for python3 use `pip3` . – jadsq Sep 03 '16 at 19:12
  • 1
    @jadsq you only need pip3 if you are installing globally. If you are inside a Python 3 virtual environment, then `pip` will work fine. – Alasdair Sep 03 '16 at 19:23
  • I'm not familiar with virtualenv, thanks for the precision. – jadsq Sep 03 '16 at 19:30