Old question but, had the same issue, with python3 -v -m pip install .. I saw it got stuck on netrc import, disabling ipv6 with sysctl -w net.ipv6.conf.all.disable_ipv6=1 fixed my issue.
python3 -v -m pip install ..
netrc
sysctl -w net.ipv6.conf.all.disable_ipv6=1