Django /manage.py运行服务器不起作用(Windows) [英] Django /manage.py runserver doesn't work (Windows)

查看:298
本文介绍了Django /manage.py运行服务器不起作用(Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows中安装了python 2.7.10。我使用命令 pip install django 在路径 c:python27 / scripts / 中安装了django,并使用命令<$创建了项目c $ c> django-admin startproject mysite 从同一路径。

I have installed python 2.7.10 in windows. I installed django in path c:python27/scripts/with a command pip install django and created project with command django-admin startproject mysite from the same path.

现在要运行服务器cd到路径 c:python27 / scripts / mysite 并运行命令 manage.py runserver / manage.py runserver 0.0.0.0: 8000 这没有任何作用。

Now to run server i cd to path c:python27/scripts/mysite and ran a command manage.py runserver/ manage.py runserver 0.0.0.0:8000 And this has no any effect.

我在哪里出错了,也无法在python控制台上运行。而且我无法从python CMD重定向到我的项目。我所做的全部是从Windows控制台完成的。

where did i go wrong, and also i couldn't run with python console. and i couldn't redirect to my project from python CMD. all i did is from windows console.

编辑:
执行
的屏幕截图

Screenshot of execution

推荐答案

第一步是设置环境变量。

First step was to set the environment variable.


  • Windows键 + 暂停控制面板\ \系统和安全性\系统

  • 高级系统设置(这将打开系统属性)

  • 导航至高级选项卡> 环境变量

  • 编辑路径-附加 ; c:\python27 在变量值字段中

  • 重新启动CMD

  • windows key + pause or Control Panel\System and Security\System
  • Advance system settings (this will open system property)
  • navigate to Advanced tab > Environment variable
  • Edit path - append ;c:\python27 in variable value field
  • Restart CMD

然后 / python manage.py runserver 应该可以工作

这篇关于Django /manage.py运行服务器不起作用(Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆