我在使用硒中的错误python

问题描述:

我尝试使用硒建设一个程序,但它只是不支持网络驱动程序。我收到以下错误。我在使用硒中的错误python

Traceback (most recent call last): 


File "C:\Users\my dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start 
    stdout=self.log_file, stderr=self.log_file) 
    File "C:\Users\my dell\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 707, in __init__ 
    restore_signals, start_new_session) 
    File "C:\Users\my dell\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 990, in _execute_child 
    startupinfo) 
FileNotFoundError: [WinError 2] The system cannot find the file specified 

During handling of the above exception, another exception occurred: 
Traceback (most recent call last): 
    File "C:\Users\my dell\AppData\Local\Programs\Python\Python36-32\records\sel.py", line 2, in <module> 
    browser = webdriver.Chrome() 
    File "C:\Users\my dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__ 
    self.service.start() 
    File "C:\Users\my dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start 
    os.path.basename(self.path), self.start_error_message) 
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home 

帮助将不胜感激。

+1

那么它毫不夸张地告诉你去哪里:https://sites.google.com/a/chromium.org/chromedriver/home, –

看来您需要安装chromechromedriver

为Debian的Linux:

apt install chromium 
wget https://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip 
unzip chromedriver_linux64.zip 
sudo cp chromedriver /usr/bin/