gpt4 book ai didi

python , Selenium : ImportError: No module named options

转载 作者:行者123 更新时间:2023-12-01 02:27:22 28 4
gpt4 key购买 nike

我正在使用 selenium,并且尝试从 python 中的 selenium 导入选项模块:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

我收到此错误:

Traceback (most recent call last):
File "C:\Users\GHIE\Desktop\jeahx\kests\test2.pyw", line 2, in <module>
from selenium.webdriver.chrome.options import Options
ImportError: No module named options

从我看来,我所拥有的 Selenium 没有名为“Options”的模块但为什么?任何想法我该如何解决这个问题?我使用的是 windows 7 和 python 2.7谢谢

最佳答案

在我看来,也许你没有安装所有东西。也许检查这个路径:

/usr/lib/python/dist-packages/selenium

并确保所有类都在某个地方。如果没有,请尝试卸载(假设您使用的是 pip):

$ sudo pip uninstall selenium

然后重新安装。

$ sudo pip install selenium

现在再试一次。

from selenium.webdriver.chrome.options import Options

如果这不起作用,请检查文档。

https://pypi.python.org/pypi/selenium

关于 python , Selenium : ImportError: No module named options,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47244539/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com