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. Bi-LSTM-CRF for Sequence Labeling

    做了一段时间的Sequence Labeling的工作,发现在NER任务上面,很多论文都采用LSTM-CRFs的结构.CRF在最后一层应用进来可以考虑到概率最大的最优label路径,可以提高指标. 一 ...

  2. httpclient: Content-Length header already present问题

    现象:用httpclient发送http请求时,客户端返回: org.apache.http.client.ClientProtocolException at org.apache.http.imp ...

  3. python 使用PyInstaller遇到的坑

    给个链接 https://github.com/yinghualuowu/Python_VLPR/releases 参数问题 在网上随处可以见到PyInstaller的参数教程. -F : 打包成单个 ...

  4. 21个项目玩转深度学习:基于TensorFlow的实践详解02—CIFAR10图像识别

    cifar10数据集 CIFAR-10 是由 Hinton 的学生 Alex Krizhevsky 和 Ilya Sutskever 整理的一个用于识别普适物体的小型数据集.一共包含 10 个类别的 ...

  5. P1055 连通块问题

    题目描述 给出一个n行m列的地图,'.'代表陆地,'W'代表水.现在需要你计算地图中有多少个水块.八个方向可以连通 比如:4*6的地图 ...WWW ...WW. WW.... .....W 中有3个 ...

  6. H3C设置时间--用户视图下

    <H3C>clock datetime ?   TIME  Specify the time (HH:MM:SS) <H3C>clock datetime 19:29:00 ? ...

  7. 【p082】排座椅

    Time Limit: 1 second Memory Limit: 50 MB [问题描述] 上课的时候总有一些同学和前后左右的人交头接耳,这是令小学班主任十分头疼的一件事情.不过,班主任小雪发现了 ...

  8. 与正则有关的JS方法结合其在项目中的应用

    与正则有关的JS方法结合其在项目中的应用 前言 最近项目中用到正则匹配比较多,因此打算深入理解和总结下各个与正则有关的方法,再结合在项目中使用的情况.与正则有关的JS方法共有7个,分别是RegExp对 ...

  9. CodeForce - 1187 E. Tree Painting (换根dp)

    You are given a tree (an undirected connected acyclic graph) consisting of nn vertices. You are play ...

  10. CodeForces - 617E XOR and Favorite Number (莫队+前缀和)

    Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is g ...