在使用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 ...
随机推荐
- CF1208 Red Blue Tree
题目链接 问题分析 这是蒟蒻第一道3500!不过话说luogu上两个题解的程序都是假的可还行(2019.11.1)-- 为了方便叙述,下面我们约定 : \([c]\) 的值为 \(1\) 当且仅当 \ ...
- 一些风骚的shell命令行操作
1.用你最喜欢的编辑器来敲命令 command <CTRL-x CTRL-e> 在已经敲完的命令后按<CTRL-x CTRL-e>,会打开一个你指定的编辑器(比如vim,通过环 ...
- flask 第十篇 after_request before_request
Flask我们已经学习很多基础知识了,现在有一个问题 我们现在有一个 Flask 程序其中有3个路由和视图函数,如下: from flask import Flask app = Flask(__na ...
- Configuring Windows for Certificate Logon
Setting up a Windows Domain ( on AD) Installing Domain Controller Roles,During installing Active Dir ...
- LeetCode 141. 环形链表(Linked List Cycle)
题目描述 给定一个链表,判断链表中是否有环. 进阶:你能否不使用额外空间解决此题? 解题思路 快慢指针,慢指针一次走一步,快指针一次走两步,若两者相遇则说明有环,快指针无路可走则说明无环. 代码 /* ...
- shell远程操作另外一台机器上数据
shell远程操作另外一台机器上的数据,有两种方式: 1 .配置免密登陆,2.使用sshpass 当前存在两台虚拟机,ip地址分别为:192.168.3.32 192.168.3.33 一.免密登陆操 ...
- Failed to execute aapt
Failed to execute aapt 没错,看到这个表示你的资源出错了.不用想别的. 比如: Failed to execute aapt com.android.ide.common.pro ...
- 图解Python 【第一篇】:Python基础1
本节内容一览图 一.Python简介 Python前世今生 python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间, ...
- LC 975. Odd Even Jump
You are given an integer array A. From some starting index, you can make a series of jumps. The (1 ...
- win10下检查nvidia显卡支持的cuda版本
1.首先将[C:\Program Files\NVIDIA Corporation\NVSMI]添加至系统环境变量[path]中: 2.在powershell中使用命令[nvidia-smi],即可看 ...