1 Unset socks proxy, in your case: unset all_proxy unset ALL_PROXY 2 Install missing dependencies: pip install pysocks 3Reset proxy, source .bashrc, and pip install works again with socks proxy.