close

[Solved] Import: No module named ‘selenium’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Import: No module named ‘selenium’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Import: No module named ‘selenium’ Error Occurs?

Today I get the following error Import: No module named ‘selenium’ in python.

How To Solve Import: No module named ‘selenium’ Error ?

  1. How To Solve Import: No module named 'selenium' Error ?

    To Solve Import: No module named 'selenium' Error If you are using Anaconda or Spyder in windows, install selenium by this code in cmd:

  2. Import: No module named 'selenium'

    To Solve Import: No module named 'selenium' Error If you are using Anaconda or Spyder in windows, install selenium by this code in cmd:

Solution 1

If you have pip installed you can install selenium like so.

pip install selenium

or depending on your permissions:

sudo pip install selenium

For python3:

sudo pip3 install selenium

As you can see from this question pip vs easy_install pip is a more reliable package installer as it was built to improve easy_install.

I would also suggest that when creating new projects you do so in virtual environments, even a simple selenium project. You can read more about virtual environments here. In fact pip is included out of the box with virtualenv!

Solution 2

If you are using Anaconda or Spyder in windows, install selenium by this code in cmd:

conda install selenium

If you are using Pycharm IDE in windows, install selenium by this code in cmd:

pip install selenium

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read