每次运行我的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'
这是我的环境路径C:\ Program Files \ Java \ jdk1.8.0_05 \ bin; C:\ Python27; C:\ Python27 \ Lib \ site-packages \; C:\ Python27 \ Scripts \; C:\ FILES \ chromedriver.exe;
我做错了什么?
答案 0 :(得分:0)
您需要将C:\FILES\chromedriver.exe
替换为C:\FILES
,因为PATH
环境变量包含以分号分隔的目录列表。