Ansible 安装 ansible ui 的时候,执行数据库脚本报错

baibing1121 · 2019年11月05日 · 最后由 lework 回复于 2019年11月06日 · 185 次阅读

(envansible) [ansible@localhost ansible_ui-master]$ python manage.py schemamigration desktop.apps.account --init Traceback (most recent call last): File "manage.py", line 11, in execute_from_command_line(sys.argv) File "/home/ansible/envansible/lib/python2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line utility.execute() File "/home/ansible/envansible/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/ansible/envansible/lib/python2.7/site-packages/django/core/management/init.py", line 272, in fetch_command klass = load_command_class(app_name, subcommand) File "/home/ansible/envansible/lib/python2.7/site-packages/django/core/management/init.py", line 75, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/home/ansible/envansible/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module import(name) File "/home/ansible/envansible/lib/python2.7/site-packages/south/management/commands/init.py", line 10, in import django.template.loaders.app_directories File "/home/ansible/envansible/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 25, in raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0])) django.core.exceptions.ImproperlyConfigured: ImportError guardian: cannot import name register

版本信息: amqp==1.4.9 ansible==2.9.0 anyjson==0.3.3 billiard==3.3.0.23 celery==3.1.26.post2 cffi==1.13.2 cryptography==2.8 Django==1.6 django-auth-ldap==1.7.0 django-celery==3.3.1 django-guardian==1.5.1 django-jsonfield==1.3.1 enum34==1.1.6 ipaddress==1.0.23 Jinja2==2.10.3 kombu==3.0.37 MarkupSafe==1.1.1 MySQL-python==1.2.5 pexpect==4.7.0 ptyprocess==0.6.0 pyasn1==0.4.7 pyasn1-modules==0.2.7 pycparser==2.19 python-ldap==3.2.0 python-magic==0.4.15 pytz==2019.3 PyYAML==5.1.2 simplejson==3.16.0 six==1.12.0 South==1.0.2 supervisor==4.1.0 threadpool==1.3.2 uWSGI==2.0.18 有大神帮忙看看是什么问题吗?

应该是django-guardian 版本依赖Django 1.7 的版本,你把以来修改下试试

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册