我在運行django時遇到了一些問題。當我使用命令manage.py runserver
時,收到一個錯誤消息:Error: [Errno 10013] An attempt was made to access a socket in a way forbidden by access permissions
manage.py runserver錯誤:[Errno 10013]
我使用postgreSQL作爲我的數據庫。
編輯:我運行Windows Vista
我在運行django時遇到了一些問題。當我使用命令manage.py runserver
時,收到一個錯誤消息:Error: [Errno 10013] An attempt was made to access a socket in a way forbidden by access permissions
manage.py runserver錯誤:[Errno 10013]
我使用postgreSQL作爲我的數據庫。
編輯:我運行Windows Vista
如果沒有綁定到一個套接字權限,你可以嘗試sudo manage.py runserver
以root權限做到這一點。
在Windows Vista/7中,您需要以管理員權限運行shell。您可以右鍵單擊圖標並選擇「以管理員身份運行」或轉至c:\windows\system32\
並右鍵單擊cmd.exe
並選擇「以管理員身份運行」。
編輯:好的,當另一個進程已經使用相同的端口時會發生此錯誤。要更改端口,請執行manage.py runserver 8080
,其中最後的數字是您想要的端口。
我在Windows8.1(IPython 1.2.0和Python 3.3.4)上遇到了同樣的問題。 我發現從https://github.com/ipython/ipython/pull/1817此解決方案:
IPython的筆記本:開始在端口8888
IPython的筆記本--port = 1234:使用端口1234
**
** 當口,你要我們錯誤出現e已被另一個程序使用。 所以你做什麼只是選擇了另一個端口,其中你可以使用端口8080 使用以下commond 蟒蛇manage.py runserver命令8080
地方審查您的答案是否爲現有答案添加任何價值_。從我的角度來看,你的答案('改變端口')與其他舊答案('改變端口')沒有區別。 –
對不起應該提到我運行Windows Vista – Zain
@Zain:AGF是一半正確的,您需要在Windows中以管理員身份運行以綁定到特權端口。 –
我也嘗試作爲管理員(命令提示符)運行,但沒有工作 – Zain