If you run from selenium import webdriver
after installing selenium, you will see the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File"/opt/anaconda3/lib/python 3.8/site-packages/selenium/webdriver/_init__.py", line 18, in <module>
from.firefox.webdriver import WebDriver as Firefox #noqa
File"/opt/anaconda3/lib/python 3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 36, in <module>
from.service import Service
File"/opt/anaconda3/lib/python 3.8/site-packages/selenium/webdriver/firefox/service.py", line 21, in <module>
class Service (service.Service):
AttributeError: module'selenium.webdriver.common.service'has no attribute'Service'
Can someone give me a solution?
Thank you for your cooperation.
Cause: How to install python modules
Workaround: If "conda install~" fails to install the module, try "conda install-conda-forge".Create and activate a new python virtual environment without any other impact.
© 2024 OneMinuteCode. All rights reserved.