首页 > 编程语言 > Python > Python中如何安装使用selenium
2019
11-28

Python中如何安装使用selenium

第一步:安装selenium
在命令提示符中输入命令:pip install selenium
如果在执行对应的python的代码时报错:Message: ‘chromedriver’ executable needs to be in PATH。则继续执行下面的第二步骤

第二步:下载安装chorme driver驱动
下载地址如下:http://chromedriver.storage.googleapis.com/index.html
此处我们选择了最新的79.0.3945.36,下载对应的Win32版本

第三步:将下载获得的chromedriver.exe的文件放到C:\Program Files (x86)\Google\Chrome\Application
如果你用的Chrome 开发版,则对应目录为C:\Program Files (x86)\Google\Chrome Dev\Application

第四步:在环境变量PATH中添加chromedriver.exe所在的目录

最后编辑:
作者:游戏创作者大陆

留下一个回复

你的email不会被公开。