Search code examples
pythonpipplaywright

Error when installing Microsoft Playwright


I'm getting this error:

At line:1 char:1
+ playwright install
+ ~~~~~~~~~~
     + CategoryInfo          : ObjectNotFound: (playwright:String) [],CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

I'm installing it using pip, for use in python


Solution

  • You need playwright added to your PATH.

    However, a better way to do this (if python is added to your path) without adding it to your PATH is by running:

    python -m playwright install
    

    This runs the playwright module as a script. Use python -h for more information on these flags, and python -m playwright for more information on the flags supported specifically by playwright