Try one of the following approaches and it should fix the error:
1. Upgrade pip version and then install the package "allennlp".
sudo pip3 install --user --upgrade pip
2. If upgrading pip does not solve the problem, install the package "sentencepiece".
sudo pip3 install sentencepiece