pip3 and python

did you install ansible using the same python version?

Like

python3 -m pip install ansible

cheers,