In my country (Viet Nam), due to network issue, PlatformIO sometimes hangs when installing packages. Because the root cause (Internet Service Provider and Content Delivery Network) is out of my reach, I come up with a workaround: using proxy. You can read it here.