Cannot open manage.py after installing django

I have a problem setting up django.

My situation: I have Anaconda Python 2.7 on my computer with Windows 8. At the command prompt, type the Anaconda: pip install django. It is successful.

Then I create a folder called "newproject". At the command prompt, I went to the "newproject" folder. Then django-admin.py startproject newproject. It is successful.

Then I launched python manage.py runserver. It tells me

"...can't open file 'manage.py': [Errno 2] No such file or directory"

I checked the udemy django installation guide and other manuals on the net. I even created a virtual environment. But the main problem is always:can't open file 'manage.py'

+7
source share
9 answers

... :

  • mkdir newproject ( , ... )
  • cd newproject
  • django-admin.py startproject newproject
  • cd newproject & larr; , . , manage.py. ls .
  • python manage.py runserver

ls , , , .

+16

, manage.py , :

"django-admin.py" "django-admin" manage.py

+2

, " ", "newproject", manage.py.

:

  • cd " ", . cd newproject

  • python manage.py runningerver

+1

.

  1. , activate environment_name
  2. , , cd Folder_Name
  3. django-admin startproject Project_Name
  4. , python manage.py startapp App_name
  5. , , python manage.py runserver, . , .
+1

. cd newproject runningerver.

0

, manage.py . manage.py newproject. , :

$cd newproject
$chmod +x manage.py

, python manage.py runserver

0

, Windows 10 , Docker . docker-desktop> > .

0

'manage.py': [Errno2] "

1: → django-admin startproject _

2: → cd _

3: → python manage.py startapp _

0

You need to add .after creating the project.

For instance: django-admin.py startproject newproject .

This will allow you to run python manage.py runserverfrom wherever you are.

0
source

All Articles