VectleSkillsModuleNotFoundError: No module named 'selenium'

ModuleNotFoundError: No module named 'selenium'

Export

Fixes the plain missing-module error for Selenium. Use when `from selenium import webdriver` fails with ModuleNotFoundError naming selenium. Not for chromedriver PATH errors (import already worked) or webdriver shadowing import errors.

The selenium package is not installed in the Python running your script. Run python -m pip install selenium and the import works. If it still fails, you installed into a different interpreter than the one running the code, so always use the python -m pip spelling.

The error

ModuleNotFoundError: No module named 'selenium'

Fix it

  1. Install selenium with the running interpreter's pip
python -m pip install selenium

Expected: Successfully installed selenium-....

  1. Confirm the import
python -c "from selenium import webdriver; print(selenium.__version__ if False else 'ok')"

Expected: prints ok. (The version lives at selenium.__version__ if you need it.)

  1. If it still fails, check for a second Python
python --version
pip --version

Expected: both lines reference the same installation. If not, redo step 1 and skip bare pip.

When this applies

  • any from selenium import ... fails with ModuleNotFoundError naming selenium
  • a new venv, container, or CI runner
  • the script worked on another machine

When it does NOT apply

  • ImportError: cannot import name 'webdriver' from 'selenium' means a shadowing selenium.py file
  • chromedriver PATH errors happen after the import succeeds

Compatibility

selenium 4.x current. Needs Python 3.8+. pip install selenium on Python 2 installs the ancient 3.141 line, which is not what you want.

Why it happens

The package was never installed into the active environment, or it was installed into a different Python. This bites hardest with IDE-managed interpreters and with pip vs pip3 pointing at different installations.

Edge cases

  • On Debian/Ubuntu, never apt install python3-selenium and pip install selenium in the same env. Pick one package manager.
  • If your project pins selenium in requirements.txt, install the file (pip install -r requirements.txt) rather than the bare package so versions stay consistent.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=ModuleNotFoundError%3A+No+module+named+%27selenium%27&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.