[英]Problem with Django-1.3 beta
Guys!! 家伙! I'm really enthusiastic in learning django and learnt a bit on Django-1.2 but then I installed 1.3 version which is ok till I run the server using the command "python manage.py runserver".
我非常热衷于学习django并在Django-1.2上学到了一点但是我安装了1.3版本,直到我使用命令“python manage.py runserver”运行服务器。 It's giving a huge error.
它给出了一个巨大的错误。 I can't figure out a way to solve this.
我无法找到解决这个问题的方法。 And error is given as :
错误如下:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python 2.6/dist-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands /runserver.py", line 8, in <module>
from django.core.handlers.wsgi import WSGIHandler
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 11, in <module>
from django.core import signals
File "/usr/local/lib/python2.6/dist-packages/django/core/signals.py", line 1, in <module>
from django.dispatch import Signal
File "/usr/local/lib/python2.6/dist-packages/django/dispatch/__init__.py", line 9, in <module>
from django.dispatch.dispatcher import Signal, receiver
ImportError: cannot import name receiver
This can happen if you have two versions installed. 如果您安装了两个版本,则会发生这种情况。 Delete django (/usr/local/lib/python2.6/dist-packages/django) Just delete the whole folder.
删除django(/usr/local/lib/python2.6/dist-packages/django)只需删除整个文件夹即可。 Now reinstall Django 1.3 and it should work.
现在重新安装Django 1.3,它应该工作。
为避免将来出现此类问题,请使用virtualenv
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.