By default localhost points to IPv6 address on a MacOS and may not work with…
By default localhost points to IPv6 address on a MacOS and may not work with codes that are compliant only with IPv4 ports. For instance i-pi for now only uses IPv4 inet sockets. However in the future version we (i-pi developers) plan to use IPv6 sockets.