python+selenium运行,关于sys.meta_path is None, Python is likely shutting down报错

在使用Python的selenium库时遇到'ImportError: sys.meta_path is None, Python is likely shutting down'错误。错误的根本原因是selenium版本与Chrome浏览器的chromedriver不兼容。解决方案包括卸载并重新安装selenium,删除不匹配的Chrome和chromedriver,然后确保安装与Chrome版本相匹配的selenium和chromedriver。推荐的Chrome版本为71.0.3578.98(64位),selenium版本为3.141.0,以及chromedriver版本为v2.43。" 544082,99299,使用链表实现大数相加:C语言代码解析,"['语言', 'c', '数据结构', '算法', 'struct']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

运行报错:

Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x015FA530>>
Traceback (most recent call last):
  File "C:\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 173, in __del__
  File "C:\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 149, in stop
  File "C:\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 120, in send_remote_shutdown_command

ImportError: sys.meta_path is None, Python is likely shutting down

1.网上查阅的方法是是说加quit就行了,其实这种方法治标不治本,每次 运行不加quit就会报错

原因分析:selenium版本和CHrome.chromedriver不匹配导致,每次Chromederiver调用chrome时后台都会打开一个Chromediver.

解决方法:1.卸载selenium ,PyCharm 2018.3.1\lib\site-packages下删除所有selenim开文件

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值