Python - 未知命令:'主管'

时间:2013-08-08 10:32:45

标签: python django supervisord

我想使用django-supervisor

我创造了一个新的virtualenv'supervisor_env' 我已经安装了django 我在supervisor_env中创建了一个名为supervisor_project的新项目

YoBre-work:virtualenvs YoBre$ mkvirtualenv supervisor_env
New python executable in supervisor_env/bin/python
Installing setuptools.............done.
Installing pip...............done.
(supervisor_env)YoBre-work:virtualenvs YoBre$ pip install django
Downloading/unpacking django
  Downloading Django-1.5.1.tar.gz (8.0MB): 8.0MB downloaded
  Running setup.py egg_info for package django

    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: django
  Running setup.py install for django
    changing mode of build/scripts-2.7/django-admin.py from 644 to 755

    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
    changing mode of /opt/virtualenvs/supervisor_env/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
(supervisor_env)YoBre-work:virtualenvs YoBre$ django-admin.py startproject supervisor_project
(supervisor_env)YoBre-work:virtualenvs YoBre$ python supervisor_project/manage.py supervisor
Unknown command: 'supervisor'
Type 'manage.py help' for usage.

我遵循了这个指南(Django-supervisor),但我坚持第一个命令

我也尝试安装主管但是得到了相同的结果

(supervisor_env)YoBre-work:virtualenvs YoBre$ pip install supervisor
Downloading/unpacking supervisor
  Downloading supervisor-3.0.tar.gz (459kB): 459kB downloaded
  Running setup.py egg_info for package supervisor

Requirement already satisfied (use --upgrade to upgrade): setuptools in ./supervisor_env/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg (from supervisor)
Downloading/unpacking meld3>=0.6.5 (from supervisor)
  Downloading meld3-0.6.10.tar.gz (41kB): 41kB downloaded
  Running setup.py egg_info for package meld3

Installing collected packages: supervisor, meld3
  Running setup.py install for supervisor

    Skipping installation of /opt/virtualenvs/supervisor_env/lib/python2.7/site-packages/supervisor/__init__.py (namespace package)
    Installing /opt/virtualenvs/supervisor_env/lib/python2.7/site-packages/supervisor-3.0-py2.7-nspkg.pth
    Installing echo_supervisord_conf script to /opt/virtualenvs/supervisor_env/bin
    Installing pidproxy script to /opt/virtualenvs/supervisor_env/bin
    Installing supervisorctl script to /opt/virtualenvs/supervisor_env/bin
    Installing supervisord script to /opt/virtualenvs/supervisor_env/bin
  Running setup.py install for meld3

Successfully installed supervisor meld3
Cleaning up...
(supervisor_env)YoBre-work:virtualenvs YoBre$ python supervisor_project/manage.py supervisor
Unknown command: 'supervisor'
Type 'manage.py help' for usage.
有人从未竞争过这个冒险吗?谢谢大家

1 个答案:

答案 0 :(得分:2)

您需要 Django Supervisor应用程序添加到设置模块中的INSTALLED_APPS列表中。引用文档:

  

要开始使用,只需在INSTALLED_APPS中包含“djsupervisor”,然后在主项manage.py脚本旁边的项目目录中删除“supervisord.conf”文件。

INSTALLED_APPS += ("djsupervisor",)