出乎意料的是,我不能再使用manage.py
“命令”(runserver、shell、syndb)。这是我得到的错误;
(pinax) C:\Python27\Projects\Catalog\pinax\catalog>python manage.py runserver
Unknown command: 'runserver'
Type 'manage.py help' for usage.
(pinax) C:\Python27\Projects\Catalog\pinax\catalog>python manage.py help
Usage: manage.py subcommand [options] [args]
Options:
--settings=SETTINGS The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be
used.
--pythonpath=PYTHONPATH
A directory to add to the Python path, e.g.
"/home/djangoprojects/myproject".
--traceback Print traceback on exception
--version show program's version number and exit
-h, --help show this help message and exit
Traceback (most recent call last):
File "manage.py", line 28, in <module>
execute_from_command_line()
File "build\bdist.win-amd64\egg\django\core\management\__init__.py", line 352,
in execute_from_command_line
File "build\bdist.win-amd64\egg\django\core\management\__init__.py", line 295,
in execute
File "build\bdist.win-amd64\egg\django\core\management\__init__.py", line 242,
in main_help_text
File "build\bdist.win-amd64\egg\django\core\management\__init__.py", line 128,
in get_commands
KeyError: 'startproject'
(pinax) C:\Python27\Projects\Catalog\pinax\catalog>
我在虚拟环境中运行 pinax 项目。因此,当我遇到此错误时,我在 windows 中通过 PYTHONPATH 检查了该错误。重新设置一下,还是没有变化。我还是 python 的新手,但出于某种原因,它似乎__init__
在构建文件中寻找“”,而不是“ site-packages\django
”。关于我的问题根源的任何想法。