kodingkid
kodingkid

Reputation: 11

Says No module named selenium when I have already installed it

I've been trying for hours to install selenium and now that I have, I get the error

Traceback (most recent call last):
  File "C:/Users/Family/Documents/open python.py", line 1, in <module>
    from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'

This is my code:

from selenium import webdriver

from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()

driver.get('https://www.python.org')

Even when I go onto cmd and try to install it, it keeps saying that the package has already been installed in python34-Lib-sitepackages:

env:C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Users\kaleem Hussain\AppData\Local\Smartbar\Application\;C:\Program Files (x86)\Skype\Phone\;C:\Python34;C:\Python34\Scripts

Upvotes: 0

Views: 1580

Answers (1)

iamsankalp89
iamsankalp89

Reputation: 4739

Try to install the selenium with pip and check it is resolved:

python -m pip install -U selenium

Upvotes: 1

Related Questions