最近在学习爬虫,使用selenium来爬取网页,第一次使用 pip install selenium 下载这个模块  。当是我第二天使用就给我报这个错误

ImportError:cannot import name 'webdriver' from 'selenium'

cannot import name ‘webdriver‘ from ‘selenium‘

原因也很简单 ,是因为我新建的名称叫selenium.py,导致Python会先导入这个文件,然后再导入标准库里面的selenium.py

只需要把自己的重命名,或者删除就okk

相关文章:

  • 2021-11-06
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-28
  • 2022-12-23
  • 2021-04-05
  • 2022-12-23
  • 2021-07-15
  • 2022-01-02
  • 2021-09-10
相关资源
相似解决方案