Trying to run a .py file on Kali Linux using:
`sudo python2 test.py`
I get the error message:
Traceback (most recent call last):
File "main.py", line 5, in <module>
import selenium
ImportError: No module named selenium
The problem is that selenium is already installed, when pip is asked to install selenium this error message is shown:
sudo pip3 install selenium
I get this message:
Requirement already satisfied: selenium in /usr/lib/python3/dist-packages (4.0.0a1)
What should I do? I guess that it is related to pip2, but I cant install it. Please help me. This the file's code:
import sys
import datetime
import selenium import requests
import time as t from sys
import stdout from selenium
import webdriver from optparse
import OptionParser