Socker Programming with Python Steps set up a separate environment python3 -m venv env activate env source env/bin/activate Binding the Socket import socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) port = 3000 hostname = '127.0.0.1' s.bind((hostname, port))