0.前言

今天写一个B站登录的模拟器时,用到了Chrome浏览器,但是会报了一个异常“'chromedriver' executable needs to be in PATH”,已经找到了解决办法,记录一下。

1.准备

需要先下载一个chromedriver,下载地址见文章最下面。

2.拷贝到相关文件夹中

①将chromedriver.exe拷贝到Chrome浏览器的的根目录

可以参考我的根目录:C:\Users\10101\AppData\Local\Google\Chrome\Application

②将chromedriver.exe拷贝到python的的根目录

参考我的python目录:D:\Program Files\Python\Python37-32

注意:如果安装了多个python,用哪个就把Chromedriver.exe拷贝到哪个python安装目录下,不确定的话最好都拷贝。使用anaconda3安装的python要吧chromedriver.exe放在anaconda3的安装目录下。

3.添加环境变量

将Chrome浏览器安装路径添加到系统环境变量Path中。

4.结束

现在就已经解决了 ‘chromedriver’ executable needs to be in PATH的问题。

chromedriver.exe下载地址

链接: https://pan.baidu.com/s/1Dn4uZgn9z2C_Y2rBo3198w 提取码: xhx6
(也可以关注公众号【编程开发分享者】,在里面回复:chromedriver,直接下载。)

解决:'chromedriver' executable needs to be in PATH的问题的更多相关文章

  1. 解决 'chromedriver' executable needs to be in PATH.'报错

    试了把chromedriver.exe放到chrome安装文件下,python安装文件下,然后把路径配到path里,均无用. 最后是修改函数调用得以解决: from selenium import w ...

  2. 关于 'chromedriver' executable needs to be in PATH 的解决办法

    用 chrome 浏览器跑 selenium,执行以下脚本: from selenium import webdriverdr=webdriver.Chrome()dr.maximize_window ...

  3. Chromedriver executable needs to be in path 解决办法

    执行webdriver.Chrome()时报错:Chromedriver executable needs to be in path. 原因可能是为有安装Chromedriver 可能是Chrome ...

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

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

  5. 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 ...

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

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

  7. 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(" ...

  8. 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 下载后拷贝到 ...

  9. (续篇)Selenium 安装配置以及如何解决('chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/ch)或者(unknown error:cannot find Chrome binary)问题?

    注:本帖针对小小白哦~~(づ ̄3 ̄)づ╭- 接pip安装的帖子,不需要的直接跳过... 首先上图,出现如下的错误,那你可是找到知己了: 或者: 抱歉抱歉,这图截的不太清晰,凑合着用吧,但是也能看出来错 ...

随机推荐

  1. H3C 帧中继与水平分割

  2. PHP两个变量值互换(不用第三变量)

    <?php /**  * 双方变量为数字或者字符串时  * 使用list()和array()方法可以达到交换变量值得目的  */ $a = "This is A"; // a ...

  3. H3C RIP路由表的更新

  4. H3C DHCP中继基本配置

  5. P1030 队列的基本操作

    题目描述 现在给你一个队列,它一开始是空的,你需要模拟队列的操作.队列的操作包括如下: "push x":将元素 x 放入队列中,其中x是一个int范围内的整数: "po ...

  6. H3C 主动方式建立连接过程

  7. node第一个参数必须是err

    Node.js 约定回调函数第一个参数必须是错误对象err: 问题:Node.js约定回调函数第一个参数必须是错误对象err,如果没有错误该参数就是null 原因:异步执行分成两段,在两段之间抛出异常 ...

  8. margin为负值的几种情况

    1.margin-top为负值像素 margin-top为负值像素,偏移值相对于自身,其后元素受影响,见如下代码: 1 <!DOCTYPE html> 2 <html lang=&q ...

  9. Linux 内核 struct device 设备

    在最低层, Linux 系统中的每个设备由一个 struct device 代表: struct device { struct device *parent; struct kobject kobj ...

  10. GitHub上传项目到远程库

    写文章 GitHub上传项目到远程库     GitHub上传项目到远程库 今天把想把文件托管到GitHub仓库,但是执行一系列的命令以后,刷新GitHub网站还是没有任何更新.后来终于找到原因,原来 ...