转载

解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P

 

'chromedriver' executable needs to be in Path

声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ̄)"

在进行爬虫爬取淘宝商品信息时候,利用selenium来模拟浏览器进行爬取时遇到了这个问题:

  selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path

详细如下图所示:

这一错误是因为没有配置好chromedriver,怎么配置呢?(我用的是chrome)

1.打开chrome 输入 “chrome://version/”来查看chrome版本 如图我的是63

2.访问此网站  http://chromedriver.storage.googleapis.com/index.html   然后选择合适版本的driver

比如

点击notes.txt就可查看其对应的版本号,如下:

如果符合就可以下载了,下载到自己指定位置然后就可以进行配置了

3. 配置如下:

(具体路径根据自己下载保存的位置而定)

4.这时候运行基本就可以成功了!

  不过很不幸,我第一次瞎下的driver版本不对,所以就GG了抛出了如下错误 ConnectionResetError:主机强迫关闭了一个现有连接

于是乎重新下了一个匹配的driver版本然后ok了

文章最后发布于: 2019-01-09 12:03:37

解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P的更多相关文章

  1. 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

    解决方案: 1.查看浏览器当前版本:chrome://version/. 2.到https://sites.google.com/a/chromium.org/chromedriver/downloa ...

  2. selenium使用遇到的问题(selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.)

    1.安装pip3 install selenium 2.使用browser=webdriver.Chrome()时报错 :selenium.common.exceptions.WebDriverExc ...

  3. python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...

  4. mac-webui-selenium下的webdriver selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    from selenium import webdriver def test1(): url='http://www.baidu.com' driver=webdriver.Chrome(" ...

  5. centos7 selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    1.查看安装的chrome浏览器版本 2.查看版本对应的驱动 https://sites.google.com/a/chromium.org/chromedriver/downloads 下载后拷贝到 ...

  6. 解决selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path

    'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...

  7. selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.

    解决办法: 把chromedriver exe文件放到python scripts目录下

  8. python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下

  9. Path通过Selenium模拟浏览器抓取,Windows 64解决selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.方法

    1.下载geckodriver.exe: 下载地址:https://github.com/mozilla/geckodriver/releases请根据系统版本选择下载:(如Windows 64位系统 ...

随机推荐

  1. 第05组 团队Git现场编程实战

    一.组员职责分工 组员 分工 卢欢(组长) 前后端接口设计 严喜 寻找相关资料 张火标 设计并描述界面原型 钟璐英 编写随笔 周华 填写完善文档 古力亚尔·艾山 填写完善文档 张聪 前后端接口设计 池 ...

  2. Margin和padding失效

    太久不写原生果然不行,Margin和padding对div有效,对span失效,原因就不解释了(元素性质,块状之类的)

  3. windows下 zabbix agent心跳数据获取异常

    模板中的心跳监控项默认是主动性的,在windows下直接装上客户端后,如果不协调时间,可能会出现心跳数据异常, 因为是主动式的监控,agent上的数据主动的推送到server上,但是从server上看 ...

  4. k均值聚类算法原理和(TensorFlow)实现

    顾名思义,k均值聚类是一种对数据进行聚类的技术,即将数据分割成指定数量的几个类,揭示数据的内在性质及规律. 我们知道,在机器学习中,有三种不同的学习模式:监督学习.无监督学习和强化学习: 监督学习,也 ...

  5. 牛逼哄哄的 Lambda 表达式,简洁优雅就是生产力!

    阅读本文大概需要 4 分钟. 作者:Sevenvidia https://www.zhihu.com/question/20125256/answer/324121308 什么是Lambda? 我们知 ...

  6. spark 通过keytab 获取认证

    /usr/local/spark--bin--cdh5.8.0/bin/spark-submit \ --keytab /home/jj/tl.keytab \ --principal vf@FC.C ...

  7. mongodb数据库操作 python+命令行

      一.python操作 from bson.objectid import ObjectId import pymongo client1 = pymongo.MongoClient(host=) ...

  8. mknod命令的使用

    1.mknod命令 在Linux系统下,mknod命令可用于系统下字符设备文件和块设备文件的创建. (1)命令语法 mknod(选项)(参数) (2)常用选项说明 -Z:设置安全的上下文. -m:设置 ...

  9. [转帖]SQL Server 2000~2017补丁包

    SQL Server 2000~2017补丁包 https://www.cnblogs.com/VicLiu/p/11510510.html 最新更新 Product Version Latest S ...

  10. 在 flutter 上使用 c 代码 - (一) 有源码的项目

    在 flutter 的 1.10.x 后的分支, dart:ffi 被并入 flutter, 现在 flutter 中也可以使用 ffi 了. 这东西是啥玩意呢, 就是让 dart 可以直接调用 c/ ...