先附上错误代码
>>> from selenium import webdriver
>>> browser = webdriver.Chrome()
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 753, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1081, in _get_handles
c2pwrite = msvcrt.get_osfhandle(self._get_devnull())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 892, in _get_devnull
self._devnull = os.open(os.devnull, os.O_RDWR)
FileNotFoundError: [Errno 2] No such file or directory: 'nul'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
browser = webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 83, 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
文件我考到相应的文件夹了
环境变量也添加了,可还是不行
各位网友能支支招吗,非常感谢