When running this command
python -m SimpleHTTPServer 8000
I am getting below listed error
socket.error: [Errno 98] Address already in use
When running this command
python -m SimpleHTTPServer 8000
I am getting below listed error
socket.error: [Errno 98] Address already in use
That message clearly tells that port 8000 is already in use, just use another port or kill another process that uses port 8000 first.
Sounds like a process is already using that port. So you will want to find which process is listening on that port and kill it
Linux
To check which process is using the port on Linux, you can install net-tools and use the command:
netstat -ltnp | grep -w ':[Port Number]'
Then using the PID (Process ID) you got from the previous command you can kill the program with the following:
kill -9 [PID]
Windows
If you are on Windows you can find the process by using:
netstat -a -n -o | find "[Port Number]"
Then you can just hop into Task Manager and kill the process.
I hope this helps
I am not sure which python version you are using but please check SimpleHTTPServer — Simple HTTP request handler python doc
I have tried :: python -m http.server 8000 --bind 127.0.0.1
it worked instead of SimpleHTTPServer