Forums

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

i was just following tutorial (http://tutorial.pythonanywhere.com/django) and then i got this error: python: can't open file 'manage.py': [Errno 2] No such file or directory i sure have manage.py in its default folder, i didnt change anything with it, but it's not working =( sorry for the dumb question, im a newbie here...

That can happen because manage.py does not have execute permissions. You can fix this with chmod +x manage.py.

thank u for help, i tried that, but still not working( 10:50 ~ $ python ./manage.py syncdb
python: can't open file './manage.py': [Errno 2] No such file or directory

12:03 ~ $ chmod +x manage.py chmod: cannot access ‘manage.py’: No such file or directory

but i definetely have that file, here's a screenshot: http://postimg.org/image/9gkaw9ob5/

my friend helped me... the answer is, if anyone will ever need it, is u gotta use this command:

python ./mysite/manage.py syncdb

Yes, it's because the file was located in a subdirectory. You need to either enter the appropriate subdirectory (with cd) or add it to the filename as you've done in your example. If you need to brush up on this sort of thing, there are any number of introductory pages out there like this one or this one.

thank you.

to me its still giving me the error

Are you in the directory where your manage.py file is?

that's right. just use cd mysite and go to the same directory as your manage.py.

that's right. just use cd mysite and go to the same directory as your manage.py.