我正在尝试用python构建一个应用程序,我需要它与网络进行接口。我正在尝试使用selenium来实现这个功能,但是我不断地得到这个错误。
这是我用的密码。
# selenium for web driving
import selenium
# SELENIUM & WEBDRIVER
# importing webdriver manager for python. selenium needs this
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.utils import ChromeType
driver = webdriver.Chrome(service=Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))
我所犯的错误是:
C:\Users\myname\Miniconda3\python.exe "//this.is.a.netword.drive/ulappa$/myname/Testiympäristö/OAMK kurssi/downloader.py"
Traceback (most recent call last):
File "\\this.is.a.netword.drive\ulappa$\myname\Testiympäristö\OAMK kurssi\downloader.py", line 15, in <module>
from webdriver_manager.chrome import ChromeDriverManager
ModuleNotFoundError: No module named 'webdriver_manager'
Process finished with exit code 1
我该怎么解决这个问题?我在cmd中安装了selenium和webdriver。
发布于 2022-05-23 09:20:15
您可能需要更改设置导入(from webdriver_manager.core.utils import...
):
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.core.utils import ChromeType
driver = webdriver.Chrome(options=options, service=Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))
发布于 2022-05-20 11:25:54
您是否使用了正确的python环境?是否安装了多个python实例?
https://stackoverflow.com/questions/72317885
复制相似问题