繁体   English   中英

Python - 未知命令:'主管'

[英]Python - Unknown command: 'supervisor'

我想要使​​用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.

有人从未竞争过这项冒险吗? 谢谢你们

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

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

INSTALLED_APPS += ("djsupervisor",)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM