Ubuntu Python selenium包 Message: 'chromedriver' executable needs to be in PATH的解决办法。

安装
直接用pip install selenium
在调用chromedriver的会出现
Message: ‘chromedriver’ executable needs to be in PATH
点击chromedriver下载相对自己Google Chromelinux版本的,
然后解压。
得到一个
在这里插入图片描述
然后复制到sudo cp chromedriver /usr/bin/
给权限,不给会出错。

sudo chmod 777 chromedriver

这里/usr/bin都是我安装chromedriverPython的目录,根据自己的安装地方移动。如果Google ChromePython安装在不同的地方,那就要移动两次。

猜你喜欢

转载自blog.csdn.net/qq_40965177/article/details/85047999