If you are using Linux, you are probably missing the libffi-dev package on your system. You need to install that package using your distribution's package manager. For example sudo apt-get install libffi-dev or sudo yum install libffi-dev, then re-run make setup.
On MacOS, the md5sum command is not available by default. If you are using homebrew, you can install the coreutils formula which contains md5sum.
Python 3.9.7 is a supported target since pyenv 2.0.6. Make sure you are using version 2.0.6 or newer of Pyenv.
You can verify the version of pyenv by typing pyenv --version. If you have the pyenv-update plugin, you can run pyenv update to update it to the latest version.