Directly install from GitHub
pip install git+https://github.com/allenai/allennlp.git
This may also create a conflict with the numpy package, so downgrade them
pip install numpy<2.0.0