Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have created a Django project "post_blog" in which I have created an app "blogs".

C:Users/arpchauh/PycharmProjects/post_blog/blogs>python manage.py runserver
python: can't open file 'manage.py': [Errno 2] No such file or directory
like image 468
Arpit Chauhan Avatar asked Jun 09 '19 08:06

Arpit Chauhan


People also ask

Can't open file Errno 2 No such file or directory?

The Python "FileNotFoundError: [Errno 2] No such file or directory" occurs when we try to open a file that doesn't exist in the specified location. To solve the error, move the file to the directory where the Python script is located if using a local path, or use an absolute path.

Can't open manage py No such file or directory?

How to Fix “python: can't open file 'manage.py': [Errno 2] No such file or directory” To fix the “python: can't open file” error, you need to go into the folder where manage.py is located. To do so, you need to type “cd mysite” at the terminal followed by “python manage.py runserver”.

How do I run manage py?

To run a task of the manage.py utilityOn the main menu, choose Tools | Run manage.py task, or press Ctrl+Alt+R . The manage.py utility starts in its own console. Type the name of the desired task.

Why does Python manage py Runserver not work?

The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.


2 Answers

manage.py should live in the root project folder, so if you cd into C:Users/arpchauh/PycharmProjects/post_blog, you should be able to run the command.

like image 112
yanxun Avatar answered Nov 15 '22 23:11

yanxun


Your manage.py file should be located in the root directory of the project. You need to be in the directory that manage.py is in.

like image 35
biswa1991 Avatar answered Nov 16 '22 00:11

biswa1991