icmplib uses raw packets to create ICMP packets. While this is not an issue in Windows, ping on Linux always runs as root to create those packets. icmplib will throw the following error if it is unable to get permissions to create raw network packets.
icmplib.exceptions.SocketPermissionError: Root privileges are required to create the socket
Use the following command to allow Python to manipulate raw network packets.
sudo setcap cap_net_raw+ep $(realpath $(which python3))
The downside to this is that it allows any python application to manipulate raw network packets. This may or may not be a security issue depending on your use-case and environment.