Skip to content
Advertisement

Why cannot I import selenium?

Why can’t I import selenium? My text is looking like this in Visual Studio code: enter image description here

I have not always had this problem. The problem occurred after I switched to Windows 11 where the c-drive was deleted.

Do someone out there know how to fix it?

I’m using Windows 11.

Advertisement

Answer

Try C:> py -m ensurepip --upgrade If you install Python correctly it’ll fix your problem with pip. Or download script from https://bootstrap.pypa.io/get-pip.py and run C:> py get-pip.py Read official site Installation – pip

After that try to run pip install -U selenium (-U to upgrade it if it exsists) If it didn’t help then download official archive from here and then run command python setup.py install

If that didn’t work try to pip uninstall selenium reboot your PC and do it again. Hope it works

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement