Initial installation / start of Django ... Errno 10013?

So, I'm a relative newbie with Python and just tried installing and running Django today. I work through the official tutorial, and when I try to run python manage.py runningerver, I get Errno 10013: an attempt was made to access a socket that was denied by its access permissions.

I am using Windows 7 and I am running cmd.exe console as administrator. Can someone explain how to fix this in plain English ? The next step in the tutorial is to visit http://127.0.0.1:8000/ and that it should say "Welcome to Django", but I just get an error.

Thanks in advance for your help.

+9
source share
4 answers

The default port may be opened in another program. Try the following:

python manage.py runserver 8080 

If this does not work, it may be a permissions issue. Some people report that just running cmd.exe as an administrator is not enough. There are several fixes for this, but they are annoying and probably indicate something strange with your Python installation. First try setting the port :-)

EDIT: Just read the blog post that says this is very common in people running Aptana / PyDev. Aptana's internal web server uses port 8000, which is the Django standard.

+44
source

I had the same problem and fixed it by running the code below in cmd as administrator (to run as admin, right-click on powershell and select "run as admin").

 python manage.py runserver 8080 
+2
source

Although I do not have McAfee installed, as well as Windows 7 (both of which are usually problematic), I had a problem running the line "python manage.py runserver". I got the error "10013". The decision was moderately simple. To get started, run the line 'netstat -ano | findstr 127.0.0.1:8000 ', which checks your port line. If a command causes a message to appear, you should change the port you are using. This can be done by adding a four-digit number at the end of the original runserver command.

Example: python manage.py runserver 7000 In the above example, the port used was changed to port 7000.

0
source

Perhaps this is due to the fact that some process uses this port, so just kill this port and start again.

  1. go cmd
  2. netstat -a -n -o

Find your port number in the local address column. If it is found, check the PID column. See which process uses this port.

  1. taskkill / f / im [PID]

It.

0
source

Source: https://habr.com/ru/post/902610/


All Articles