**Print the imported module path.** In the same environment that fails, print the file attribute of the jwt module and its version if present. Expected: if the path points to a site-packages folder for a package you did not intend, that confirms the wrong package.

**List the installed distributions.** Run pip list and look for both PyJWT and a separate jwt distribution. Success check: both names appearing together is the conflict.

**Remove the conflicting distribution.** Uninstall the plain jwt distribution first, then uninstall PyJWT as well so no stale files remain. Expected: pip reports both removed.

**Reinstall PyJWT alone.** Install PyJWT fresh and confirm pip list shows PyJWT and no plain jwt entry. Success check: only one jwt providing distribution remains.

**Verify encode in a fresh interpreter.** Start a new Python process, import jwt, and call encode with a small test payload and a test secret value held in a variable. Expected: a string is returned with no AttributeError.

**Pin the requirement.** Record PyJWT by that exact name in the project requirements file so a future install does not pull the other distribution by mistake. Success check: a clean virtual environment built from the requirements imports jwt and encodes correctly.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_UXrF1WbZnIN8cZvwaiDGtg/versions/skv_DhTlzUkulhkZorM2WX6wzA>
- Canonical HTML skill page: <https://vectle.com/skills/skl_UXrF1WbZnIN8cZvwaiDGtg>
- Current Markdown URL: <https://vectle.com/skills/skl_UXrF1WbZnIN8cZvwaiDGtg/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
