Home » How-To » How to Fix “python: can’t open file ‘manage.py’: [Errno 2] No such file or directory”

How to Fix “python: can’t open file ‘manage.py’: [Errno 2] No such file or directory”

Are you getting a “python: can’t open file ‘manage.py’: [Errno 2] No such file or directory” error?

It can happen when you type “python manage.py runserver” into the terminal.

You got the error because you’ve added the manage.py file in a sub-directory.

The file needs to be at the root of the project folder and not a sub-directory.

Otherwise, it’ll give you the “can’t open file” error.

In this guide, you’ll learn how to fix “python: can’t open file ‘manage.py’: [Errno 2] No such file or directory“.

How to Fix “python: can’t open file ‘manage.py’: [Errno 2] No such file or directory”

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”.

Step 1: Type “cd mysite” into the terminal

cd mysite

Step 2: Run “python manage.py runserver”

python manage.py runserver

Here’s what happens after you run the command:

“Watching for file changes with StatReloader”.

“Performing system checks…”.

“System check identified no issues (0 silenced).

“You have x unapplied migration(s)”.

Starting development server at

You’ve successfully fixed the python error!

Further reading

How to Fix “Uncaught SyntaxError: Cannot use import statement outside a module”

How to Fix “A JavaScript error occurred in the main process” on Discord

Best Binance Referral ID Code in 2022

About the author

Lim How Wei

Lim How Wei is the founder of followchain.org, with 8+ years of experience in Social Media Marketing and 4+ years of experience as an active investor in stocks and cryptocurrencies. He has researched, tested, and written thousands of articles ranging from social media platforms to messaging apps.

Lim has been quoted and referenced by major publications and media companies like WikiHow, Fast Company, HuffPost, Vice, New York Post, The Conversation, and many others. One of his articles about the gig economy was quoted by Joe Rogan who hosts The Joe Rogan Experience (arguably the most popular podcast in the world), in the This Past Weekend podcast by Theo Von.

In his free time, Lim plays multiple games like Genshin Impact, League of Legends, Counter-Strike, Hearthstone, RuneScape, and many others. He creates guides, walkthroughs, solutions, and more on games that he plays to help other players with their progression.