Zain
Zain

Reputation: 63

manage.py runserver Error: [Errno 10013]

I am having some problems running django. When I use the command manage.py runserver I receive an error that says: Error: [Errno 10013] An attempt was made to access a socket in a way forbidden by access permissions

I use postgreSQL as my database.

Edit: I run Windows Vista

Upvotes: 6

Views: 18740

Answers (3)

Ariyo sezi
Ariyo sezi

Reputation: 1

**

  • [Errno 10013]

** that error comes when the port you want to use is already in use by the another program. so what you do just choose for another port which of which you can use port 8080 use the following commond python manage.py runserver 8080

Upvotes: 0

MaSa
MaSa

Reputation: 13

I had the same problem on my Windows8.1 (IPython 1.2.0 and Python 3.3.4). I found this solution from https://github.com/ipython/ipython/pull/1817 :

ipython notebook : start at port 8888

ipython notebook --port=1234 : use port 1234

Upvotes: 0

agf
agf

Reputation: 176950

If you don't have permission to bind to a socket, you can try sudo manage.py runserver to do it with root privileges.

With Windows Vista / 7 you need to run the shell with administrator privileges. You can right click on the icon and select "Run as administrator" or go to c:\windows\system32\ and right click on cmd.exe and select "Run as administrator".

Edit: OK, this error occurs when another process is already using the same port. To change the port, do manage.py runserver 8080 where the number at the end is the port you want.

Upvotes: 22

Related Questions