Django Start project not working after install

时光怂恿深爱的人放手 提交于 2020-03-23 08:01:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!