The problem is that knockpy is a python2 script and it won’t work in python3, as you are using official kali release it defaults to python3. So you can try:
python -m pip install dnspython
The easiest solution would be to use the latest custom kali image provided by Zaid. It’s important! It has many tools more installed and will fix many issues present in original release. If you want to use any other kali version for your own work is ok.