Importing webdriver from selenium cannot find reference

Hi there!

I've installed selenium from pip and it seems to be worked fine. When I write 'from selenium import webdriver', the last is shown and I can found out the folder under Python36>selenium>webdriver. But the problem is PyCharm say "Cannot find reference 'webdriver' in 'imported module selenium'" and can't see why...

Any idea?


Comment actions Permalink

1. Please check the project interpreter configured. See below example to locate it on Pycharm

2. If 1 does not work, pip uninstall selenium and pip install -U selenium ( I observed it with some users that though they installed selenium not all required files are installed, I would recommend you to uninstall and install selenium)

3.if both do not work for you, read below links from stackoverflow to try some more options: 

Comment actions Permalink

Just name your pytnon file NOT !!!
It is not looking for webdriver in selenium, but in your file, where you are trying to connect it


Please sign in to leave a comment.