[WinError 2] python Selenium webDriver 中的FileNotFoundError [英] [WinError 2]FileNotFoundError in python Selenium webDriver
本文介绍了[WinError 2] python Selenium webDriver 中的FileNotFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始学习 python Selenium.我刚刚通过 pip pip install python-selenium
下载并开始编写第一行,此时出现
然后我用 Chrome 试了一下,但出现了同样的情况.谁能解决这个问题?
解决方案
您执行以下操作并检查它是否有效.使用
升级python绑定pip install -U selenium
对于 chrome 下载最新的 chrome 驱动程序ChromeDriver 2.45"并编写代码
from selenium import webdriverdriver=webdriver.Chrome("Chromedriver 的路径" + "chromedriver.exe" )
I'm started to learn python Selenium. I just downloaded by pip pip install python-selenium
and started to write first lines and at this moment appeares
>>> from selenium import webdriver
>>> from selenium.webdriver.common.keys import Keys
>>> driver = webdriver.Firefox()
[WinError2] FileNotFoundError...
...
Then I tried it with Chrome but appeares the same thing. Who can solve this problem?
解决方案
You do following things and check whether it works. Upgrade python bindings using
pip install -U selenium
for chrome download the latest chrome driver "ChromeDriver 2.45" and write the code
from selenium import webdriver
driver=webdriver.Chrome("Path of the Chromedriver" + "chromedriver.exe" )
这篇关于[WinError 2] python Selenium webDriver 中的FileNotFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文