Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve No module named 'selenium' in VS code?

How to solve No module named 'selenium' in VS code?

Module to be used

from selenium import webdriver 
import time,sys,csv,pyautogui

However, the following error occurred.

ModuleNotFoundError: No module named 'selenium'

I tried in VS code to solve this error.

A similar situation with me, stack overflow the resolution, but failed.

-> ImportError: No module named 'selenium'

1.pip install selenium
2.conda install selenium

enter image description here -> select Python 3.8.5 -64bit(conda)

how to solved ModuleNotFoundError? help me..

comment update(programandoconro) enter image description here

-> An error still occurs.

comment update(Prophet)

enter image description here

-> An error still occurs.

like image 448
elk_basic Avatar asked Nov 15 '25 13:11

elk_basic


1 Answers

Please try python3 -m pip install selenium. This will allow you to use the current active version of Python you are using.

Update:

I saw that you are using an .ipynb extension. I am not an expert in those kind of environments but I would try to run !python3 -m pip install selenium inside the file (not the terminal). This only the first time, then you can comment that line. Please try that.

like image 157
programandoconro Avatar answered Nov 18 '25 10:11

programandoconro