Execute playwright install
from Python.
from install_playwright import install
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
install(p.chrome)
browser = p.chrome.launch()
# ...
import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
install(p.chrome)
browser = await p.chrome.launch()
# ...
pip install install-playwright
MIT