Reputation: 1
For the first time, I tried to use selenium.
First, I installed selenium with the code "pip install selenium."
Then, I checked that folder "selenium" was in the "C:\Users\tstak\Anaconda3\Lib\site-packages."
However, selenium didn't work in IDLE (Python 3.7) with the code "from selenium import webdriver
."
I downloaded selenium, and check where it is.
from selenium import webdriver
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
>>> from selenium important webdriver
SyntaxError: invalid syntax
>>> from selenium import webdriver
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
>>> from selenium import webdriver
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
>>> from selenium import webdriver
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
>>> from selenium import webdriver
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
>>> from selenium import webdriver
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
>>>
Upvotes: 0
Views: 1215
Reputation: 41
I believe Anaconda3 and the Python default IDLE draw their installed packages from different directories.
Also make sure you have the latest version of geckodriver installed as well otherwise it still might not work. Im new to python and had this issue as well but a there was a question on here that helped me with geckodriver.
How to use the gecko executable with Selenium
Upvotes: 1