You have a file named `pyppeteer.py` in your working directory, so Python imports your file instead of the installed package, and your file has no `launcher` submodule. Rename your file to anything else (and delete `__pycache__`), and the real package imports normally.

## The error

```text
ModuleNotFoundError: No module named 'pyppeteer.launcher'; 'pyppeteer' is not a package
```

## Fix it

1. **Confirm the shadowing**

```
python -c "import pyppeteer; print(pyppeteer.__file__)"
```
Expected: if it prints a path in your project ending in `pyppeteer.py`, that file is the problem. A real install prints a site-packages `__init__.py` path.

2. **Rename your file**

Rename `pyppeteer.py` to something like `pyppeteer_script.py` and delete the `__pycache__` folder next to it. Then:
```
python -c "from pyppeteer.launcher import launch; print('ok')"
```
Expected: prints `ok`.

## When this applies

- the error says `'pyppeteer' is not a package`
- your script lives next to a file named `pyppeteer.py`
- the import works in every folder except your project folder

## When it does NOT apply

- plain `No module named 'pyppeteer'` means nothing is installed
- this is the same shadowing trap as the selenium/playwright `X.py` files, just with pyppeteer's name

## Compatibility

All pyppeteer versions. The `'; 'pyppeteer' is not a package'` suffix is Python telling you it found a module where a package was expected.

## Why it happens

Python's import order checks the script's directory before site-packages. Naming your script `pyppeteer.py` makes your file the `pyppeteer` module. When something then asks for the `pyppeteer.launcher` submodule, the import system complains that your single file is not a package and therefore cannot contain submodules.

## Edge cases

- Tutorials sometimes tell you to save example code as `pyppeteer.py`. Do not. The name is reserved by the package.
- A `pyppeteer/` folder with an incomplete `__init__.py` shadows the same way. Rename it too.
