怎样在python用安装selenium_如何使用python3安装selenium?

提取后。焦油gz运行python setup install,selenium就安装在....

creating /usr/local/lib/python2.7/dist-packages/selenium-3.4.3-py2.7.egg

Extracting selenium-3.4.3-py2.7.egg to /usr/local/lib/python2.7/dist-packages

Adding selenium 3.4.3 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/selenium-3.4.3-py2.7.egg

.....

跑步时

^{pr2}$

它工作得很好

但是python3.6 functionalTest.py

给出,错误:ModuleNotFoundError: No module named 'selenium'

因为我无法使用python3.6在Ubuntu上成功安装selenium,如下所示$ ls setup*

setup.cfg setup.py

$ python3.6 setup install

python3.6: can't open file 'setup': [Errno 2] No such file or directory

$ python3.6 setup.py install

Traceback (most recent call last):

File "setup.py", line 22, in

from setuptools import setup

ModuleNotFoundError: No module named 'setuptools'

.....

Original exception was:

Traceback (most recent call last):

File "setup.py", line 22, in

from setuptools import setup

ModuleNotFoundError: No module named 'setuptools'

$

编辑:

安装setuptools后,以下是观察结果$ python3.6 setup.py install

.....

creating /usr/local/lib/python2.7/dist-packages/selenium-3.4.3-py2.7.egg

Extracting selenium-3.4.3-py2.7.egg to /usr/local/lib/python2.7/dist-packages

selenium 3.4.3 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/selenium-3.4.3-py2.7.egg

Processing dependencies for selenium==3.4.3

Finished processing dependencies for selenium==3.4.3

$ cd /usr/local/lib/python

python2.7/ python3.5/ python3.6/

$

$ easy_install --version

setuptools 20.7.0 from /usr/lib/python2.7/dist-packages (Python 2.7)

$ pip --version

pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

$

问题:

如何配置python3.6来选择selenium?为什么在/usr/local/lib/python2.7中安装了selenium,尽管使用了python3.6?在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值