A file named `pyquery.py` in your working directory is shadowing the installed package. Rename it (and delete `__pycache__`), and the import works. The pyquery maintainer flags this exact trap in the issue thread.

## The error

```text
ImportError: cannot import name 'PyQuery' from 'pyquery'
```

## Fix it

1. **Confirm the shadowing**

```
python -c "import pyquery; print(pyquery.__file__)"
```
Expected: a project path ending in `pyquery.py` means your file is the problem. site-packages means the install is genuinely broken.

2. **Rename your file**

Rename `pyquery.py` to something like `query_demo.py`, clear `__pycache__`, then:
```
python -c "from pyquery import PyQuery; print('ok')"
```
Expected: prints `ok`.

3. **If nothing shadows it, reinstall**

```
python -m pip install --force-reinstall pyquery
```
Expected: the import works. A damaged install can leave a pyquery directory without the class.

## When this applies

- `from pyquery import PyQuery` raises ImportError naming `PyQuery`
- pyquery is installed but your script sits next to `pyquery.py`

## When it does NOT apply

- `No module named 'pyquery'` is the missing install
- `cannot import name 'etree' from 'lxml'` is the old-lxml-on-3.12 problem

## Compatibility

All pyquery versions. Pure import-semantics trap.

## Why it happens

The script's directory beats site-packages in import order, so `pyquery.py` next to your script becomes the `pyquery` module. Your file defines no `PyQuery` class, so the from-import fails. Same family as the selenium.py / playwright.py / newspaper.py traps.

## Edge cases

- The cached `__pycache__/pyquery.*.pyc` keeps shadowing after a rename. Delete the cache dir.
