port already in use python code example Example: mac error that port is already in use sudo lsof -t -i tcp:8000 | xargs kill -9