2016-05-10 130 views
5

我在Ubuntu 16.04上安装了python3-selenium apt软件包。在安装时,得到了一个消息:如何在ubuntu上安装python3 selenium的firefoxdriver webdriver?

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

当我尝试运行python3-Django的测试用例,我得到以下错误:

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

我并寻找包在Ubuntu软件仓库firefoxdriver的名字,但没有存在。

任何帮助安装webdrivers赞赏。

+0

你可能会考虑询问http://askubuntu.com或http://superuser.com,但据我所知,这与编程无关,甚至与'selenium'似乎没有关系(或者python或者django) –

回答

3

我不知道如何在安装python3-selenium软件包后安装Firefox webdriver。

您可以使用pip来安装,理想情况下可以在虚拟环境中安装。

如果您安装了Firefox并且在虚拟环境中运行了pip install selenium,那么您应该很好。

+0

我通过ubuntu python3-selenium包安装了selenium。有没有什么办法可以为此安装firefox webdriver?或者,你是否建议通过pip安装? – shishirjaiswal

+0

通过pip安装工作!谢谢@Alasdair。 – shishirjaiswal

+1

也为我工作。小评论:python3使用'pip3'。 – jadsq

相关问题