After I created a virtual enviroment and the necessary files, I ran, python manage.py runserver and there was an error. This is what the terminal gave me: C:\Users\****\AppData\Local\Microsoft\WindowsApps\python.exe: can't open file: 'C:\\Users\\****\\Desktop\\pydjango\\django-project\\manage.py': [Errno 2] No such file or directory
Related
I've deployed an app to heroku and ran heroku run bash -a {app_name}
Once it successfully opens a bash console and I run ls I see nothing.
If I run pwd it says I'm in the /app directory where my project files should be.
I am also unable to run any commands using my manage.py file e.g. heroku run python manage.py migrate results in a python: can't open file 'manage.py': [Errno 2] No such file or directory
I tried run django project with code
docker-compose -f local.yml run --rm django python manage.py runserver
but i had such problem:
python: can't open file 'manage.py': [Errno 2] No such file or directory
in another computer this project run
but this code work
docker-compose -f local.yml run django python
I get that error when I am working in the wrong directory as the manage.py. Double check which directory that you are in.
(venv) C:\Users\...\PycharmProjects\WebP1>python manage.py runserver
C:\Users\...\AppData\Local\Programs\Python\Python37-32\python.exe: can't open file 'manage.py':
[Errno 2] No such file or directory
This is the error I get post updating to Python. Just before i updated the command was working and I could run my website.
Should I revert back to 3.5 or how can I actually get my py file to be found?
I needed to be another directory deep when doing the command after the update took place. For some reason the update moved me out a directory.
cd [folder name]
(venv) C:\Users\...\PycharmProjects\WebP1\[folder name]>python manage.py runserver
I created a project named testdj, and under the directory /tmp/python-test/testdj/testdj/, I want to create a django app, so I use the below command:
aircraftdeMacBook-Pro:testdj ldl$ python manage.py startapp TestModel
python: can't open file 'manage.py': [Errno 2] No such file or directory
But the the upper error, can't open file 'manage.py' there.
I find the stack overflow, there is some the same error, but they are not when creating app occurs.
i guess you are using django app,
so first
pip install django
django-admin startproject project_name
django-admin startapp app_name
python manage.py runserver
I'm trying to start a django project in Cygwin with: django-admin.py startproject mysite However, I'm getting the following errors:
C:\Python34\python.exe: can't open file '/cygdrive/c/Python34/Scripts/django-admin.py': [Errno 2] No such file or directory
My PATH in Windows include paths to "django-admin.py":
...;C:\cygwin64;C:\cygwin64\usr\sbin;C:\Python34;C:\Python34\Scripts;C:\Python34\Lib\site-packages\django\bin;...
Instead of using
django-admin runserver
try this
C:\Users\Admin\Desktop\github\django\Scripts\django-admin.py runserver
here the django stands for virtual environment