[英]WebDriverException: Message: 'ChromeDriver executable needs to be available in the path
Every time I run my python algorithm I am getting this error in cmd: 每次我运行python算法时,都会在cmd中收到此错误:
Traceback (most recent call last):
File "newScrape.py", line 1, in <module>
import SScraper as SS
File "build\bdist.win32\egg\SScraper\__init__.py", line 45, in <module>
File "C:\Python27\lib\site-packages\selenium-2.43.0-py2.7.egg\selenium\webdriv
er\chrome\webdriver.py", line 59, in __init__
self.service.start()
File "C:\Python27\lib\site-packages\selenium-2.43.0-py2.7.egg\selenium\webdriv
er\chrome\service.py", line 68, in start
and read up at http://code.google.com/p/selenium/wiki/ChromeDriver")
selenium.common.exceptions.WebDriverException: Message: 'ChromeDriver executable
needs to be available in the path. Please download from http://
chromedriver.storage.googleapis.com/index.html and read up at htt
p://code.google.com/p/selenium/wiki/ChromeDriver'
Here is my enviroment path C:\\Program Files\\Java\\jdk1.8.0_05\\bin;C:\\Python27;C:\\Python27\\Lib\\site-packages\\;C:\\Python27\\Scripts\\; 这是我的环境路径C:\\ Program Files \\ Java \\ jdk1.8.0_05 \\ bin; C:\\ Python27; C:\\ Python27 \\ Lib \\ site-packages \\; C:\\ Python27 \\ Scripts \\; C:\\FILES\\chromedriver.exe; C:\\ FILES \\ chromedriver.exe;
What am I doing wrong? 我究竟做错了什么?
您只需将C:\\FILES\\chromedriver.exe
为C:\\FILES
因为PATH
环境变量包含用分号分隔的目录列表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.