search

Home  >  Q&A  >  body text

python - 为什么安装了selenium但是引入不了webdriver

PHPzPHPz2786 days ago970

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-04-18 10:29:55

    The script file name cannot have the same name as the module name, just change it

    reply
    0
  • 阿神

    阿神2017-04-18 10:29:55

    There is a file named selenium.py 的 module, import 的時候會優先引入該模組, 那自然是沒有 webdriver under your current path.

    Just change the name, this is a very common import problem.


    Questions I answered: Python-QA

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:29:55

    It seems that Selenium is not installed. Visual inspection uses python3 but the system has built-in Python 2?
    You may need to reinstall selenium using pip3

    pip3 install selenium

    reply
    0
  • Cancelreply