As reported in issue ansible/ansible#76414, currently attempting to install ansible=5.0.0 with less than python3.8 will result in an error because ansible-core now ...
I get an error doing that, it seams that pip is trying to install requirements.txt as opposed to reading the contents. Adding the -r works for me: Run python -m pip ...