django-admin.py startproject不工作 [英] django-admin.py startproject is not working
问题描述
django-admin.py startproject mysite
,这样工作,然后我有一个简单的网站工作,我想开始一些真正的东西,所以我尝试 django-admin.py startproject newsite
,没有发生任何事情。每当我尝试命令什么也没有发生什么发生了什么错误?对于任何人绊倒现在,这个问题是Windows的结果,不遵守django-admin.py顶部的#!C:\Path\To\Virtualenv\Scripts\Python.exe hashbang,因此运行它与错误的python.exe (显然是一个virtualenv bug)。
但是,使用virtualenv激活,可以使用以下命令,这将导致使用正确的python,一切正常:
python C:\Path\To\Virtualenv\Scripts\django-admin.py startproject< project_name> ;
after installing django I tried django-admin.py startproject mysite
and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite
and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
For anyone stumbling across this now, this problem is a result of Windows not obeying the #!C:\Path\To\Virtualenv\Scripts\Python.exe hashbang at the top of django-admin.py, and therefore running it with the wrong python.exe (evidently a virtualenv bug).
However, with virtualenv active, you can use the following command, which will result in the correct python being used, and everything being ok:
python C:\Path\To\Virtualenv\Scripts\django-admin.py startproject <project_name>
这篇关于django-admin.py startproject不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!