程序问答   发布时间:2022-06-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了from selenium.webdriver.firefox.options import Options ModuleNotFoundError: No module named 'selenium'大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决from SELEnium.webdriver.firefox.options import Options ModuleNotFoundError: No module named 'SELEnium'?

开发过程中遇到from SELEnium.webdriver.firefox.options import Options ModuleNotFoundError: No module named 'SELEnium'的问题如何解决?下面主要结合日常开发的经验,给出你关于from SELEnium.webdriver.firefox.options import Options ModuleNotFoundError: No module named 'SELEnium'的解决方法建议,希望对你解决from SELEnium.webdriver.firefox.options import Options ModuleNotFoundError: No module named 'SELEnium'有所启发或帮助;

这是我的问题:当我运行 thos 脚本时,我的 cmd 向我返回一条错误消息,该消息与我的模块的导入有关。

导入脚本:

import logging
import os
import time
from lib2to3.pgen2 import driver

from SELEnium.webdriver.firefox.options import Options
from SELEnium.webdriver.common.by import By
from SELEnium.webdriver.support.wait import webdriverwait
from SELEnium.webdriver.support import expected_conditions as EC
from webdriver_manager.Chrome import ChromeDriveRMANager
from SELEnium.webdriver.Chrome.options import Options
from SELEnium import webdriver
from SELEnium.webdriver.firefox.webdriver import firefoxProfile
from SELEnium.webdriver import ActionChains,DesiredCapabilitIEs


# ================================ LOGGER ====================================
import pathlib
import platform
import shutil
import psutil

第一个 cmd 的消息是:

from SELEnium.webdriver.firefox.options import Options
ModuleNotFoundError: No module named 'SELEnium'

起初我认为这是我在安装 SELEnium 后安装的 firefox 导航器的错误,但最后命令提示符给了我与 Chrome 相同的消息 :O ! 我检查了我的 Pyhton 的版本:“Python 3.9.2”。然后卸载SELEnium(已经安装了):

pip uninstall SELEnium
Found exisTing installation: SELEnium 3.141.0
Uninstalling SELEnium-3.141.0:
  Would remove:
    c:\users\w10cp\desktop\stage\venv\lib\site-packages\SELEnium-3.141.0.dist-info\*
    c:\users\w10cp\desktop\stage\venv\lib\site-packages\SELEnium\*
Proceed (y/n)? y
  successfully uninstalled SELEnium-3.141.0

然后我@R_625_10696@它:

pip install SELEnium
CollecTing SELEnium
  Using cached SELEnium-3.141.0-py2.py3-none-any.whl (904 kB)
requirement already satisfIEd: urllib3 in c:\users\w10cp\desktop\stage\venv\lib\site-packages (from SELEnium) (1.26.4)
Installing collected packages: SELEnium
successfully installed SELEnium-3.141.0

但那是一样的:

from SELEnium.webdriver.firefox.options import Options
ModuleNotFoundError: No module named 'SELEnium'

所以我跑了

C:\Users\w10cp\Desktop\Stage>python
Python 3.9.2 (tags/v3.9.2:1a79785,Feb 19 2021,13:44:55) [MSC v.1928 64 bit (AMD64)] on win32
Type "Help","copyright","credits" or "license" for more information.
>>> import SELEnium

但没有任何变化

file "<stdin>",line 1,in <module>
ModuleNotFoundError: No module named 'SELEnium'

所以我继续使用 Stack OverFlow 寻找答案。 我成功卸载了 SELEnium 然后执行:

python -m pip install -U SELEnium

所以我再次运行我的脚本,结果如​​下:

from webdriver_manager.Chrome import ChromeDriveRMANager
ModuleNotFoundError: No module named 'webdriver_manager'

所以我做了

pip install webdriver_manager

它已成功安装,但它返回相同的错误消息。 如果有人知道我必须做什么,请帮助我。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的from selenium.webdriver.firefox.options import Options ModuleNotFoundError: No module named 'selenium'全部内容,希望文章能够帮你解决from selenium.webdriver.firefox.options import Options ModuleNotFoundError: No module named 'selenium'所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。