如何在ubuntu上为python3硒安装firefoxdriver webdriver? [英] How to install firefoxdriver webdriver for python3 selenium on ubuntu?

查看:28
本文介绍了如何在ubuntu上为python3硒安装firefoxdriver webdriver?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 16.04上安装了python3-selenium apt软件包.在安装过程中,收到一条消息:

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

当我尝试在python3-django中运行测试用例时,出现以下错误:

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'

我确实在Ubuntu存储库中搜索了名为firefoxdriver的软件包,但是不存在.

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

感谢您对安装网络驱动程序的任何帮助.

Any help with installing the webdrivers appreciated.

推荐答案

我不确定在安装 python3-selenium 软件包后如何安装Firefox Webdriver.

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

您可以改用pip进行安装,最好在虚拟环境中进行安装.

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

如果您已经安装了Firefox,并且在虚拟环境中运行 pip install selenium ,那么您应该一切顺利.

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

这篇关于如何在ubuntu上为python3硒安装firefoxdriver webdriver?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆