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
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.
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”.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With