我将django1.9.1与python3.3一起使用。 运行runserver时出现以下错误
File "/home/virtualenv/python3.3.5/lib/python3.3/site-packages/django/dispatch/__init__.py", line 9, in <module>
from django.dispatch.dispatcher import Signal, receiver # NOQA
File "/home/virtualenv/python3.3.5/lib/python3.3/site-packages/django/dispatch/dispatcher.py", line 14, in <module>
from weakref import WeakMethod
ImportError: cannot import name WeakMethod
在我阅读的时候,weakref的WeakMethod已经在python3.4中引入,而它在python3.3的weakref中并不存在。在
关于如何用Python3.3修复相同错误的任何建议。在
Django 1.9.x不支持Python 3.3:
https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
您可以降级到django1.8或将Python解释器升级到3.4或更高版本。在
相关问题 更多 >
编程相关推荐