gpt4 book ai didi

python-3.x - 由于 ModuleNotFoundError : No module named 'webdriver_manager' Ubuntu Python 无法运行运行脚本

转载 作者:行者123 更新时间:2023-12-04 18:29:40 25 4
gpt4 key购买 nike

我正在使用 anaconda、jupyter 并安装了 pip 和 pip3 webdriver_manager,但是当我尝试运行我的 python3 代码时,我不断收到此错误。当我在终端中运行代码时

$ pip install webdriver_manager
Collecting webdriver_manager
Using cached https://files.pythonhosted.org/packages/dd/3c/2e2d71aeb28ee73ecaf12b545542b082ca81c8c091bb05028c52c42696ce/webdriver_manager-2.4.0-py2.py3-none-any.whl
Collecting requests (from webdriver_manager)
Using cached https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl
Collecting configparser (from webdriver_manager)
Using cached https://files.pythonhosted.org/packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl
Collecting crayons (from webdriver_manager)
Using cached https://files.pythonhosted.org/packages/5b/0d/e3fad4ca1de8e70e06444e7d777a5984261e1db98758b5be3e8296c03fe9/crayons-0.4.0-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->webdriver_manager)
Using cached https://files.pythonhosted.org/packages/9f/f0/a391d1463ebb1b233795cabfc0ef38d3db4442339de68f847026199e69d7/urllib3-1.25.10-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2 (from requests->webdriver_manager)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->webdriver_manager)
Using cached https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl
Collecting idna<3,>=2.5 (from requests->webdriver_manager)
Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting colorama (from crayons->webdriver_manager)
Using cached https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Installing collected packages: urllib3, chardet, certifi, idna, requests, configparser, colorama, crayons, webdriver-manager
Successfully installed certifi-2020.6.20 chardet-3.0.4 colorama-0.4.3 configparser-4.0.2 crayons-0.4.0 idna-2.10 requests-2.24.0 urllib3-1.25.10 webdriver-manager-2.4.0
在我的 IDE 中,我得到了这个输出
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
import requests
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from webdriver_manager.firefox import GeckoDriverManager

ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-87a373070a15> in <module>
9 import requests
10 from selenium.webdriver.firefox.options import Options as FirefoxOptions
---> 11 from webdriver_manager.firefox import GeckoDriverManager

ModuleNotFoundError: No module named 'webdriver_manager'
我一直在尝试在 SO 上发布的几种解决方案,但都没有解决问题

最佳答案

我遇到过同样的问题。在我的情况下,解决方案是 python3.8 -m pip install webdriver_manager现在它可以工作了

关于python-3.x - 由于 ModuleNotFoundError : No module named 'webdriver_manager' Ubuntu Python 无法运行运行脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64095970/

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