当我安装了django-registration-redux并尝试运行python manage.py syncdb
时出现以下错误:
OSError: [Errno 20] Not a directory: '/usr/local/lib/python2.7/dist-packages/django_registration_redux-1.2-py2.7.egg/registration/migrations'
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/core/management/base.py", line 393, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/core/management/base.py", line 444, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/core/management/commands/migrate.py", line 93, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/db/migrations/executor.py", line 19, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/db/migrations/loader.py", line 47, in __init__
self.build_graph()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/db/migrations/loader.py", line 176, in build_graph
self.load_disk()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/db/migrations/loader.py", line 93, in load_disk
for name in os.listdir(directory):
OSError: [Errno 20] Not a directory: '/usr/local/lib/python2.7/dist-packages/django_registration_redux-1.2-py2.7.egg/registration/migrations'
答案 0 :(得分:0)
这https://github.com/macropin/django-registration/issues/43可能会给你一些指导。
<强>更新强>
我遇到了同样的问题,这是一个开放的错误 - see this。
从/usr/local/lib/python2.7/dist-packages/
删除django registration redux egg并使用python setup.py develop
重新安装。这应该有用。
答案 1 :(得分:0)
https://github.com/macropin/django-registration/issues/103帮助我。 使用python setup.py开发重新安装registration redux