can't open file django-admin.py, no such file error - python

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

Related

This site can't be reached - Django

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

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

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.

I updated python to 3.7 from 3.5 and now manage.py cannot be found

(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

How to do run:"python manage.py runserver in vscode.i want to run a new server for my project

How to do run: python manage.py runserver in Visual Studio Code?
I get the below error
"Can not open file manage.py:no such file or directory"
go to that folder where is you 'manage.py' file through cm
Folder name
and then run you command
python3 manage.py runserver
In vscode terminal (Ctrl+\ hotkey) change path (with cd command) to directory where manage.py file of your project saved, and then run python manage.py runserver

python: can't open file 'manage.py' when I create django app

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

Categories