在使用selenium时出现FileNotFoundError: [WinError 2] 系统找不到指定的文件。
今天在使用selenium出现这样的错:
Traceback (most recent call last):
File "E:\python\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "E:\python\lib\subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "E:\python\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
上网查了一下发现是找不到chromedriver。
然后使用下面的链接下载相应的chromedriver
http://npm.taobao.org/mirrors/chromedriver/

下载后解压出 chromedriver.exe的文件,将其粘贴到自己python安装的主目录下或者python安装目录下的Scripts里就大功告成
下载的时候看错了Chrom的版本,结果出现了如下错:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 79
因为下载的chromedriver.exe版本比我的Chrom版本要高,解决办法:列如我使用的Chrom版本是 78.0.3904.108,下载了一个78.0.3904.70.结果也能用
在使用selenium时出现FileNotFoundError: [WinError 2] 系统找不到指定的文件。的更多相关文章
- python FileNotFoundError: [WinError 2] 系统找不到指定的文件。
D:\Test\TestSWP\Scripts\python.exe D:/Test/SWP/TestSWP/chorme/chorme.pyTraceback (most recent call l ...
- 路径不对 导致FileNotFoundError: [WinError 2] 系统找不到指定的文件, 问题解决办法
执行python + selenium 代码 from selenium import webdriver driver = webdriver.Chrome("D:\AutoConf\bi ...
- FileNotFoundError: [WinError 2] 系统找不到指定的文件
用Idle运行Python脚本的时候发现如下错误: Traceback (most recent call last): File "D:\Python\Python36-32\lib\s ...
- FileNotFoundError: [WinError 2] 系统找不到指定的文件。 解决方案
用Idle运行Python脚本的时候发现如下错误: Traceback (most recent call last): File "C:\Users\DangKai\Desktop\pyt ...
- [Python学习]错误篇二:切换当前工作目录时出错——FileNotFoundError: [WinError 3] 系统找不到指定的路径
REFERENCE:<Head First Python> ID:我的第二篇[Python学习] BIRTHDAY:2019.7.13 EXPERIENCE_SHARING:解决切换当前工 ...
- pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path && FileNotFoundError: [WinError 2] 系统找不到指定的文件。
C:\Users\k\Desktop\test>python test.py Traceback (most recent call last): File , in run_tesseract ...
- 转换文件格式遭遇 FileNotFoundError:[WinError 2]系统找不到指定的文件
重启试试
- TextClip构造方法报OSError:MoviePy creation of None failed because of the following [WinError 2]系统找不到指定的文件
☞ ░ 前往老猿Python博文目录 ░ 在使用moviepy的构造方法创建实例时报错: "C:\Program Files\Python37\python.exe" F:/stu ...
- building '_mysql' extension error: [WinError 2] 系统找不到指定的文件。
D:\4yanjiiu\APIzidong\MySQL-python-1.2.5>py running install running bdist_egg running egg_info wr ...
随机推荐
- MySQL认识索引
什么是索引? 索引在MySQL中也叫是一种“键”,是存储引擎用于快速找到记录的一种数据结构.索引对于良好的性能非常关键,尤其是当表中的数据量越来越大时,索引对于性能的影响愈发重要.索引优化应该是对查询 ...
- php原生导出简单word表格(TP为例) (原)
后台: # 菲律宾名单word导出 public function export_word(){ $tids = $_GET['tids']; $userinfo=M("philippi ...
- Selenium Firefox 官方Webdriver -- Geckodriver
下载地址: https://github.com/mozilla/geckodriver/releases 配置环境: 直接将解压的geckodriver.exe放到python的Scripts中 比 ...
- 手把手教你设置MongoDB密码
mongodb密码和传统数据如mysql等有些区别: mongodb的用户名和密码是基于特定数据库的,而不是基于整个系统的.所有所有数据库db都需要设置密码. 1. 查看所有数据库(在mongodb新 ...
- 【零基础】搞定LAMP(linux、apache、mysql、php)环境安装图文教程(基于centos7)
一.前言 LAMP即:Linux.Apache.Mysql.Php,也就是在linux系统下运行php网站代码,使用的数据库是mysql.web服务软件是apache.之所以存在LAMP这种说法,倒不 ...
- MongDB的DateZone
先理解:Date本身是没有格式的,只是一个毫秒数,要显示成某种格式就一定是字符串 https://github.com/ewcmsfree/ewcms/wiki/Help-mongo-java-dri ...
- 【软件工程】Beta版本演示
团队信息 队名:女生都队 组长博客: 博客链接 成员 学号 史恩泽(组长) 031702122 施金海 031702121 阮君曦 031702116 陈银山 031702137 李季城 031702 ...
- [Navicat]把1个库的数据迁移到另1个库--数据库备份
需求: 将autotest库中所包含的所有表,从连接centOS7复制1份至localhost.autotest 操作步骤: 1.将centOS7.autotest库中表结构及表数据转为sql语句:c ...
- Hive的内部表和外部表
- iOS开发UIkit动力学UIDynamicAnimator一系列动画
UIDynamicAnimator类,通过这个类中的不同行为来实现一些动态特性. UIAttachmentBehavior(吸附),UICollisionBehavior(碰撞),UIGravityB ...