0
votes

When I attempt to run my Selenium code on ubuntu, I am receiving the following error:

from selenium import webdriver Traceback (most recent call last): File "", line 1, in ImportError: No module named 'selenium'

2
Can you clarify what your Selenium installation looks like? i.e., did you run 'pip install selenium' on the machine, etc? What setup steps for ubuntu did you follow? - CEH
i upgrade python2.7 to python 3.5. also install pip - Raj

2 Answers

1
votes

It's very simple. Following commands will done the job.

$ sudo apt-get install python-pip
$ sudo pip install selenium

If you still have problem then follow the documentation. You can also check related thread here.

1
votes

Try this

Why You Getting This Error:

Well Python Says There is no selenium installed in python

If You Want To Use Selenium You Need To Download Install With Terminal:

Here is The Way You Can Try:

if Your pip3 is recognized Try This:

pip3 install selenium

if you get this error:

Command Not Found

Something Like That

Try This:

sudo apt-get install python-pip
sudo pip install selenium