关于 'chromedriver' executable needs to be in PATH 的解决办法
用 chrome 浏览器跑 selenium,执行以下脚本:
from selenium import webdriver
dr=webdriver.Chrome()
dr.maximize_window()
dr.get('http://www.baidu.com/')
报错信息:WebDriverException: Message: 'chromedriver' executable needs to be in PATH
发现是 chromedriver.exe 文件放置的位置不对,我按网上查到的普遍 chrome 安装路径 C:\Program Files (x86)\Google\Chrome\Application,
并加入环境变量 PATH 中,但实际我的 chrome 安装地址是 D:\Users\ma_jj\AppData\Local\Google\Chrome\Application
将放入该路径下,并将该路径加入到环境变量 PATH 中,问题得以解决。

可通过右键点击chrome浏览器图标-->属性-->目标,获取chrome的安装目录。
关于 'chromedriver' executable needs to be in PATH 的解决办法的更多相关文章
- 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 ...
- Chromedriver executable needs to be in path 解决办法
执行webdriver.Chrome()时报错:Chromedriver executable needs to be in path. 原因可能是为有安装Chromedriver 可能是Chrome ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- 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.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path
'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...
- 解决:'chromedriver' executable needs to be in PATH的问题
0.前言 今天写一个B站登录的模拟器时,用到了Chrome浏览器,但是会报了一个异常"'chromedriver' executable needs to be in PATH", ...
- 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(" ...
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
解决办法: 把chromedriver exe文件放到python scripts目录下
- java出现no XXX in java.library.path的解决办法及eclipse配置
java一般使用两个path:classpath 和 java.library.path classpath是指向jar包的位置 java.library.path是非java类包的位置如(dll,s ...
随机推荐
- P1005 Spell It Right
# P1005 Spell It Right 原题 Given a non-negative integer N, your task is to compute the sum of all the ...
- python进程池和进程锁
1.进程锁:from multiprocessing import Process, Lock def f(l, i): l.acquire() print('hello world', i) l.r ...
- [Go] 时序数据库influxdb的安装
日志类的数据时候存储在时序数据库中,下面就是时序数据库influxdb的安装 curl -sL https://repos.influxdata.com/influxdb.key | apt-key ...
- Linux系统学习 六、网络基础—Linux的IP地址的配置
1.ifconfig命令临时配置IP地址 2.setup工具永久配置IP地址 3.修改网络配置文件 4.图形界面配置IP地址 ifconfig命令临时配置IP地址 主要的作用是查看网络信息,也可以临时 ...
- 阿里云ubuntu 16.04 搭建pptpd 第二版
前言:1.我常用的服务器在国内,但我又有某方面的需求,所以想要搭建一个pptpd的服务器 2.但我又不常用,所以感觉阿里云包年包月的不划算,所以准备采用阿里云按量付费的实例来搭建pptpd,并形 ...
- CodeForces-1217D (拓扑排序/dfs 判环)
题意 https://vjudge.net/problem/CodeForces-1217D 请给一个有向图着色,使得没有一个环只有一个颜色,您需要最小化使用颜色的数量. 思路 因为是有向图,每个环两 ...
- txt换行追加写入
with open(negative_txt, 'a') as f: patch_name1 = patch_name + '\n' f.write(patch_name1)
- acwing 600. 仰视奶牛
题目地址 https://www.acwing.com/problem/content/description/602/ 约翰有N头奶牛,编号为1到N. 现在这N头奶牛按编号从小到大的顺序站成了一排 ...
- 使用 github pages快速部署自己的静态网页
看见很多大神在Github Pages上部署Demo,感觉效果还不错,刚才自己也试了一下,发现其实并不难! 选择 github pages 的理由 使用零成本: github pages 集成在 gi ...
- WPF 动态列(DataGridTemplateColumn) 绑定数据 (自定义控件)对象绑定
原文:WPF 动态列(DataGridTemplateColumn) 绑定数据 (自定义控件)对象绑定 WPF 动态列(DataGridTemplateColumn) 绑定数据 (自定义控件) 上面的 ...