解决:'chromedriver' executable needs to be in PATH的问题
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的问题的更多相关文章
- 解决 'chromedriver' executable needs to be in PATH.'报错
试了把chromedriver.exe放到chrome安装文件下,python安装文件下,然后把路径配到path里,均无用. 最后是修改函数调用得以解决: from selenium import w ...
- 关于 'chromedriver' executable needs to be in PATH 的解决办法
用 chrome 浏览器跑 selenium,执行以下脚本: from selenium import webdriverdr=webdriver.Chrome()dr.maximize_window ...
- Chromedriver executable needs to be in path 解决办法
执行webdriver.Chrome()时报错:Chromedriver executable needs to be in path. 原因可能是为有安装Chromedriver 可能是Chrome ...
- 解决selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path
'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...
- 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 ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- 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(" ...
- 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 下载后拷贝到 ...
- (续篇)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安装的帖子,不需要的直接跳过... 首先上图,出现如下的错误,那你可是找到知己了: 或者: 抱歉抱歉,这图截的不太清晰,凑合着用吧,但是也能看出来错 ...
随机推荐
- HDU 2674
0 <= N<=10^9 看到这个数据范围知道常规方法肯定做不出来. 不过一想想既然是mod2009,是不是只要其中含有一个2009,那么其结果一定是0了呢 说了这里思路,就是看什么时候出 ...
- poj1573
题意:给出一个矩形,N,E,S,W分别代表进行移动的方向,如果走出矩形网格则输出经过的网格数,如果在矩形网格内循环,则输出没进入循环之前所走过的网格数和循环所经过的网格数: 思路:创建两个数组,一个字 ...
- 安装 NodeJ Koa2、3 + 独立插件 cli脚手架 npm cnpm Vue
安装 NodeJ npm cnpm Koa2.3 + 独立插件 cli脚手架 Vue 安装 在 这里写过了 这两个分开了写 Nodej:下载 node.js 安装 10.0版 ...
- HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite
org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite r ...
- 2018-8-10-C#-代码占用的空间
title author date CreateTime categories C# 代码占用的空间 lindexi 2018-08-10 19:16:52 +0800 2018-2-13 17:23 ...
- ZR1158
ZR1158 http://www.zhengruioi.com/contest/446/problem/1158 给定限制的问题大多数都是容斥或者二分,或者二分之后容斥 首先,这个问题的第一步我们还 ...
- 2018-10-23-使用-Pandoc-把-Markdown-转-Docx
title author date CreateTime categories 使用 Pandoc 把 Markdown 转 Docx lindexi 2018-10-23 10:56:18 +080 ...
- CF809D Hitchhiking in the Baltic States
CF809D Hitchhiking in the Baltic States CF809D 长度为n的序列{xi},n<=3e5,范围在(li,ri)之间,求LIS最长是多长g(i,l)表示前 ...
- HBase的安装及使用
一.摘要以前搜书吧的数据量比较小,使用数据库+静态文件存储的方式就可以搞定,主要有2个系统组成:网站前端+后台服务.事先把图书详情等一些固定内容生成html静态文件和前端的其他静态文件打包部署,动态变 ...
- python3中lambda函数
def make_repeater(n): return lambda s:s*n twice=make_repeater(2) print(twice('wwss')) print(twice(2) ...