errno 98 address already in use code example
Example 1: [Errno 98] Address already in use
kill -9 $(ps -A | grep python | awk '{print $1}')
Example 2: OSError: [Errno 98] Address already in use
$ ps -fA | grep python
501 81211 12368 0 10:11PM ttys000 0:03.12
python -m SimpleHTTPServer
$ kill 81211
Example 3: uvicorn ERROR: [Errno 98] Address already in use
#find the process using the port
lsof -i :8000
#and kill it
kill -9 process_id
Example 4: OSError: [Errno 98] Address already in use
kill -9 $(ps -A | grep python | awk '{print $1}')