1. Make sure you run playwright/pytest commands from the same folder/virtual environment location where playwright or pytest-playwright is installed
  2. Make sure you have pip installed. In terminal/command line (inside your project’s path) run:
pip --version

If it’s not, follow steps in this article: How to Install PIP on Windows ? - GeeksforGeeks

  1. Find pip packages location:
pip list -v

Copy the pip’s path:

Untitled

paste it in File explorer and hit enter:

Untitled

If you don’t find playwright or pytest_playwright folder(s), skip to step 5.

If you see those (or one of them), delete them (along with ..dist-info folders):

Untitled

  1. Re-install pytest-playwright: