问题
The django project will not create. I keep getting this same error, please help. I am not sure what else can be done.
回答1:
As suggested by @Flux in your comment, use django-admin to start your project.
django-admin startproject winsdompets
You can refer to this question to ensure your django-admin path is one of your environment variables.
By the way, to avoid those environmental issues in Mac or other platform, you can try to use pipenv to manage your Django environment.
The following are instructions for Mac users.
# path/to/your/project/directory
brew install pipenv
# It will create a new env and open a terminal shell, or open an existing env if there are pip settings files
pipenv shell
pip install Django
django-admin startproject winsdompets
回答2:
You should activate the python environment before you create a project. 1. check the path of "django-admin"
sudo find / -name "django-admin"
2.check the path of "python"
which python
If the paths are different, activate python in the directory of "django-admin". eg. the path of "django-admin" is /var/www/env/bin/djang-admin
source /var/www/env/bin/activate
来源:https://stackoverflow.com/questions/60555515/django-start-project-not-working-after-install