Traceback (most recent): File "c:\_____soft______\python3.6\lib\site-packages\selenium\webdriver\common\ service.py ", line-up, in-start stdin=pipe) File" c:\_____soft______\python3.6\lib\subprocess.py ", line 709, in __init_ _ Restore_signals, Start_new_session) File "c:\_____soft______\python3.6\lib\subprocess.py", line 997, in _execute_chi LD 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 "alimama.py", Line on <module> sp = Spider () File "alimama.py", line one, in __init__ self.web = Webdriver. Chrome () File "c:\_____soft______\python3.6\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line-up, in _ _init__ Self.service.start () File "c:\_____soft______\python3.6\lib\site-packages\selenium\webdriver\common\ service.py ", line-I, in Start Os.path.basename (Self.path), self.start_error_message) Selenium.common.exceptions.WebDrIverexception:message: ' chromedriver ' executable needs to is in PATH. Please see Https://sites.google.com/a/chromium.org/chromedriver/home
1, first need to download browser driver
2, even if it is Firefox, in version>47, also need to install Firefox browser driver
3. The browser driver needs to be placed in the Python installation directory
4, System environment variables, path needs to add browser driver address
Modify the subprocess.py file
def __init__ (self, args, bufsize=-1, Executable=none, Stdin=none, Stdout=none, Stderr=none,shell=true, add here Preexec_fn=none, Close_fds=_platform_default_close_fds, shell=false, Cwd=none, Env=none, Universal_ Newlines=false, Startupinfo=none, creationflags=0, restore_signals=true, Start_new_session=false, Pass_fds= (), *, Encoding=none, Errors=none):
Python filenotfounderror: [Winerror 2] The system cannot find the file specified.