I want to work with IP subnets / IP addresses in Python. I created the Python code using the
ipaddress module. When I run the code in the pycharm IDE, it works fine. But when I run on the command prompt by typing
python test.py, it shows the following error.
ValueError: '10.0.0.0/24' does not appear to be an IPv4 or IPv6 network
import ipaddress srcIp = ipaddress.ip_network("10.0.0.0/24") print(srcIp)