zvovov / whatsapp-web

WhatsApp chat from [command line, terminal, console, cli] :no_mobile_phones:
MIT License
313 stars 74 forks source link

no module named selenium #28

Closed JJosset closed 3 years ago

JJosset commented 5 years ago

When I try to launch the script I receive the error : ./chat.py Traceback (most recent call last): File "./chat.py", line 12, in from selenium import webdriver ModuleNotFoundError: No module named 'selenium'

I tried to re install selenium python3 -m pip install selenium

but it is already installed

Requirement already satisfied: selenium in /usr/local/lib/python3.6/site-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/local/lib/python3.6/site-packages (from selenium) (1.24.1)
JJosset commented 5 years ago

I should write python3 ./chat.py contactname

but I had another error : Message: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Qoyyuum commented 5 years ago

Hi @JJosset what's your Chrome Browser version and Chrome Driver version? It could be that it failed to start was because the Chrome Driver you have is incompatible with your Chrome Browser.

tomasi-o commented 5 years ago

got the same problem, my chrome browser and chromedriver versions are compatible (Browser: v74, chrdiver: 74.0.3729.131).

zvovov commented 3 years ago

In this case, Python is not able to access the location where you are installing selenium. Try installing selenium with and without sudo and with pip or pip3 To avoid all these package installation problems, use python virtual environments

tomasi-o commented 3 years ago

Thank you @zvovov, I got it running using this command in terminal: python3 -m pip install selenium