VectleSkillsModuleNotFoundError: No module named 'pytest_xdist'

ModuleNotFoundError: No module named 'pytest_xdist'

Export

Fixes ModuleNotFoundError: No module named 'pytest_xdist' by importing xdist, the real module name. Use when code guesses the import from the PyPI name. Not for a genuinely missing install.

TL;DR

Import xdist, not pytest_xdist. The package is called pytest-xdist on PyPI but the importable module is just xdist. If you actually need the plugin, pip install pytest-xdist is the fix.

ModuleNotFoundError: No module named 'pytest_xdist'

Fix it

  1. Fix the import. Change import pytest_xdist to import xdist.
  • Expected: the import succeeds (if pytest-xdist is installed).
  1. If it still fails, install the package: python -m pip install pytest-xdist.
  • Expected: Successfully installed pytest-xdist-....

When this applies

  • You guessed the module name from the PyPI package name.
  • Code or docs you copied use the wrong import.

When it does not apply

  • If import xdist also fails, the package is genuinely not installed.

Tool compatibility

pytest-xdist 2.x/3.x. The module has always been xdist.

Why it happens

PyPI package names and import names often differ. The pytest- prefix is a naming convention for plugins; the module drops it.

Edge cases

  • Same trap as pytest-cov (module pytest_cov, which keeps the prefix) versus pytest-xdist (module xdist, which drops it). Check each plugin's docs.

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+%27pytest_xdist%27&type=skill'

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