I can't run my Django project, can you help?
While py can run any py file in the terminal as py_any_project_name.py, when I type py manage.py runserver or python manage.py runserver, I get python not found error. Any ideas on the cause and solution? I'm using Python 3.10 and it's attached to the environment variables as the path..
For example i create an example.py file that includes print("Example").
py example.py
Example
py manage.py runserver
Python can not found.
CodePudding user response:
You need to enter that file path to run it, or just paste the file path of the python file. I hope I was able to help!
CodePudding user response:
You can actually run administrative django commands without a manage.py script, which you might be lacking. Make sure your environment variables are correctly setup (DJANGO_SETTINGS_MODULE and whatnot) and django is installed in your python environment and try to run
python -m django runserver