<i id='KHIA7'><tr id='KHIA7'><dt id='KHIA7'><q id='KHIA7'><span id='KHIA7'><b id='KHIA7'><form id='KHIA7'><ins id='KHIA7'></ins><ul id='KHIA7'></ul><sub id='KHIA7'></sub></form><legend id='KHIA7'></legend><bdo id='KHIA7'><pre id='KHIA7'><center id='KHIA7'></center></pre></bdo></b><th id='KHIA7'></th></span></q></dt></tr></i><div id='KHIA7'><tfoot id='KHIA7'></tfoot><dl id='KHIA7'><fieldset id='KHIA7'></fieldset></dl></div>

    1. <small id='KHIA7'></small><noframes id='KHIA7'>

        • <bdo id='KHIA7'></bdo><ul id='KHIA7'></ul>
      1. <legend id='KHIA7'><style id='KHIA7'><dir id='KHIA7'><q id='KHIA7'></q></dir></style></legend>
        <tfoot id='KHIA7'></tfoot>

        错误消息:“'chromedriver' 可执行文件需要在

        时间:2023-10-08
      2. <legend id='ZxtV3'><style id='ZxtV3'><dir id='ZxtV3'><q id='ZxtV3'></q></dir></style></legend>
          • <bdo id='ZxtV3'></bdo><ul id='ZxtV3'></ul>

                <tfoot id='ZxtV3'></tfoot>
                <i id='ZxtV3'><tr id='ZxtV3'><dt id='ZxtV3'><q id='ZxtV3'><span id='ZxtV3'><b id='ZxtV3'><form id='ZxtV3'><ins id='ZxtV3'></ins><ul id='ZxtV3'></ul><sub id='ZxtV3'></sub></form><legend id='ZxtV3'></legend><bdo id='ZxtV3'><pre id='ZxtV3'><center id='ZxtV3'></center></pre></bdo></b><th id='ZxtV3'></th></span></q></dt></tr></i><div id='ZxtV3'><tfoot id='ZxtV3'></tfoot><dl id='ZxtV3'><fieldset id='ZxtV3'></fieldset></dl></div>

                1. <small id='ZxtV3'></small><noframes id='ZxtV3'>

                    <tbody id='ZxtV3'></tbody>
                2. 本文介绍了错误消息:“'chromedriver' 可执行文件需要在路径中可用"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在 python 中使用 selenium,并已从以下站点为我的 windows 计算机下载了 chromedriver:http://chromedriver.storage.googleapis.com/index.html?path=2.15/

                  I am using selenium with python and have downloaded the chromedriver for my windows computer from this site: http://chromedriver.storage.googleapis.com/index.html?path=2.15/

                  下载 zip 文件后,我将 zip 文件解压缩到我的下载文件夹.然后我将可执行二进制文件的路径(C:UsersmichaelDownloadschromedriver_win32)放入环境变量Path"中.

                  After downloading the zip file, I unpacked the zip file to my downloads folder. Then I put the path to the executable binary (C:UsersmichaelDownloadschromedriver_win32) into the Environment Variable "Path".

                  但是,当我运行以下代码时:

                  However, when I run the following code:

                    from selenium import webdriver
                  
                    driver = webdriver.Chrome()
                  

                  ...我不断收到以下错误消息:

                  ... I keep getting the following error message:

                  WebDriverException: Message: 'chromedriver' executable needs to be available in the path. Please look at     http://docs.seleniumhq.org/download/#thirdPartyDrivers and read up at http://code.google.com/p/selenium/wiki/ChromeDriver
                  

                  但是 - 如上所述 - 可执行文件是(!)在路径中......这里发生了什么?

                  But - as explained above - the executable is(!) in the path ... what is going on here?

                  推荐答案

                  如果你打开一个 cmd 并输入 chromedriver(假设你的 chromedriver 可执行文件是仍然像这样命名)并按 Enter.如果出现 Starting ChromeDriver 2.15.322448,则说明 PATH 设置正确,还有其他问题.

                  You can test if it actually is in the PATH, if you open a cmd and type in chromedriver (assuming your chromedriver executable is still named like this) and hit Enter. If Starting ChromeDriver 2.15.322448 is appearing, the PATH is set appropriately and there is something else going wrong.

                  或者,您可以像这样使用 chromedriver 的直接路径:

                  Alternatively you can use a direct path to the chromedriver like this:

                   driver = webdriver.Chrome('/path/to/chromedriver') 
                  

                  所以在你的具体情况下:

                  So in your specific case:

                   driver = webdriver.Chrome("C:/Users/michael/Downloads/chromedriver_win32/chromedriver.exe")
                  

                  这篇关于错误消息:“'chromedriver' 可执行文件需要在路径中可用"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Selenium:WebDriverException:Chrome 无法启动:由于 google 下一篇:如何让 Selenium 不等到整个页面加载,它的脚本很

                  相关文章

                  最新文章

                  1. <tfoot id='DtGB3'></tfoot>

                  2. <i id='DtGB3'><tr id='DtGB3'><dt id='DtGB3'><q id='DtGB3'><span id='DtGB3'><b id='DtGB3'><form id='DtGB3'><ins id='DtGB3'></ins><ul id='DtGB3'></ul><sub id='DtGB3'></sub></form><legend id='DtGB3'></legend><bdo id='DtGB3'><pre id='DtGB3'><center id='DtGB3'></center></pre></bdo></b><th id='DtGB3'></th></span></q></dt></tr></i><div id='DtGB3'><tfoot id='DtGB3'></tfoot><dl id='DtGB3'><fieldset id='DtGB3'></fieldset></dl></div>

                      <small id='DtGB3'></small><noframes id='DtGB3'>

                        <bdo id='DtGB3'></bdo><ul id='DtGB3'></ul>
                      <legend id='DtGB3'><style id='DtGB3'><dir id='DtGB3'><q id='DtGB3'></q></dir></style></legend>