简体   繁体   English

我无法运行命令:python manage.py runserver

[英]I can't run the command : python manage.py runserver

I can't run the command 'python manage.py reunserver' on my terminal.我无法在终端上运行命令“python manage.py reunserver”。 I dont know why, here is what the terminal shows me:我不知道为什么,这是终端向我显示的内容:

enter image description here在此处输入图像描述

Can please someone help me?可以请有人帮助我吗?

I tried to execute the django dev server but it didn't worked.我尝试执行 django 开发服务器,但没有成功。 Normally, it show something like this: enter image description here通常,它显示如下: enter image description here

You are not using virtual env.您没有使用虚拟环境。 You need to activate your virtual env which you are using in your second image first then it will work flawlessly.您需要首先激活您在第二张图片中使用的虚拟环境,然后它才能完美运行。

Try again do new project with following commands:再次尝试使用以下命令创建新项目:

python -m venv venv
venv\Scripts\Activate
pip -m install django
django-admin startporject NAME

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM