Traceback (most recent call last): File "D:/Python/Python36-32/lib/site-packages/selenium-3.4.3-py3.6.egg/selenium/webdriver/common/service.py", line 74, in start stdout=self.log_file, stderr=self.log_file) File "D:/Python/Python36-32/lib/subprocess.py", line 707, in __init__ restore_signals, start_new_session) File "D:/Python/Python36-32/lib/subprocess.py", line 990, in _execute_child startupinfo)FileNotFoundError: [WinError 2] 系统找不到指定的文件。
百度解决方案:
process1 = subprocess.Popen(command1,stdout=subprocess.PIPE,shell=True)
Also, please do note, you should only use shell=True when absolutely necessary (as in this case , to use echo in windows in subprocess).