I hit this while installing a local pwntools checkout:
error: externally-managed-environment This is not a pwntools problem. It is Python packaging doing what the distro asked it to do. On recent Debian and Ubuntu systems, the system Python is marked as externally managed, so pip install into the global interpreter is blocked by default.
This is the way I install pwndbg from a local checkout when I want the Python dependencies isolated in a venv.
I am not using setup.sh here. The script is convenient, but it also tries to install system packages with sudo. For a clean user-level install, I prefer doing the Python part explicitly.