If you are trying to install beets on macOS using pipx and encounter a SystemError: buffer overflow coming from fcntl.ioctl, it is likely because pipx defaulted to Python 3.14.2.
Python 3.14 has introduced stricter buffer checks that break the way Beets detects terminal width on macOS.
File ".../beets/ui/__init__.py", line 715, in term_width