【python】+'chromedriver' executable needs to be in PATH
Python to in 39 be path needs
2023-09-11 14:16:50 时间
方法一:
step1:下载谷歌驱动程序:下载地址
step2:把“chromedriver.exe”复制到 谷歌浏览器(C:\Program Files\Google\Chrome\Application)和python(C:\Python27)的安装目录
step3:将谷歌浏览器目录(C:\Users\HD003\AppData\Local\Google\Chrome\Application)添加到path环境变量
方法二:
如果方法一不行,直接使用 executable_path="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe" 赋值
1 from selenium import webdriver 2 3 driver = webdriver.Chrome(executable_path="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe") 4 driver.get("http://www.baidu.com/")
相关文章
- 【学习总结】Python-3-算术运算符中的/和//
- 【python】数据库
- [Python] Handle Exceptions to prevent crashes in Python
- association in CDS view is converted to LEFT OUTER MANY TO ONE JOIN in the runtime
- Atitit python3.0 3.3 3.5 3.6 新特性 Python2.7新特性1Python 3_x 新特性1python3.4新特性1python3.5新特性1值得关注的新特性1Python3.6新特性2 Python2.7新特性Python 2.7的新特性 - 牛皮糖NewPtone - 博客园.html Python 3_x 新特性及10大变化_python_脚本之家.htm
- 成功解决Fatal error in launcher: Unable to create process using ‘“…python.exe“ “…jupyter.exe“ notebook‘
- Python编程语言学习:python中浅复制/深复制(或浅拷贝/深拷贝)的简介、案例应用注意事项之详细攻略
- Python编程语言学习:基于两个等长列表输出对应位置值是否相同并返回一个bool布尔类型的等长列表
- Python之tkinter:动态演示调用python库的tkinter带你进入GUI世界(LabelFrame/Checkbutton/Radiobutton)
- Python之tkinter:动态演示调用python库的tkinter带你进入GUI世界(Listbox/Scrollbar)
- Python之tkinter:动态演示调用python库的tkinter带你进入GUI世界(Button展示图片事件)
- Python之tkinter:动态演示调用python库的tkinter带你进入GUI世界(Canvas)
- Python之多线程:python多线程设计之同时执行多个函数命令详细攻略
- 已解决Visit python.org to download an earlier version of Python.
- 已解决(Python安装报错)Visit python.org to download an earlier version of Python.
- python代替js写前端脚本之计算器demo(browser.html)
- Python编程:python中的计时器timeit模块
- python 设计模式之工厂模式 Factory Pattern (简单工厂模式,工厂方法模式,抽象工厂模式)
- python基础1--列表
- 转载:News: Robot Framework 3.0 is the first Robot Framework version to support Python 3
- python基础===Python 迭代器模块 itertools 简介
- selenium+python headless 爬虫环境配置