pythonseleniumpycharm

Pycharm Referenced Error With Import Selenium Webdriver


Am using Python 3.6.5rcs , pip version 9.0.1 , selenium 3.11.0. The Python is installed in C:\Python and selenium is in C:\Python\Lib\site-packages\selenium. The environment variables have been set. But the code
from selenium import webdriver
gives an unresolved reference error. Any suggestion on how to fix the problem.


Solution

  • Pycharm > Preferences > Project Interpreter

    Then hit the '+' to install the package to your project path.

    Or you can add that path to your PYTHONPATH environment variable in your project.