第一步,下载的适合自己浏览器chromedriver版本,下载地址如下:
http://chromedriver.storage.googleapis.com/index.html
第二步,找到安装pythond的路径,如果找不到有两种方法:
1.进入pycharm 找到python bin 路径,把chromedriver放入python bin路径下(bin目录在Lib路径上一级)
放入chromedriver在bin路径下,如果需要移动 mv 移动文件或者目录/文件或者目录重命名
2,查看python路径
import sys
sys.path
备注:chromedriver 最好放在bin路径下,chrome浏览器最好不要更新,不然又需要重新安装chromedriver