0
votes

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

1
Could you paste your PATH and PYTHONPATH env vars? And what is the abs path where you installed selenium? - Old Panda
Are you sure the Python you're running is the same one that has selenium installed? - user2357112 supports Monica
Yes,100% they are both 3.6 - kodingkid
This output shows a bunch of Python 3.4 stuff. - user2357112 supports Monica
I uninstalled python 3.4 as I was told to update, this is the video i watched youtube.com/watch?v=0vsswJooDe0 - kodingkid

1 Answers

1
votes

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

python -m pip install -U selenium