<p>我尝试安装xadmin(它是django的插件,用于backoffice和twitter的引导)。但是当我运行我的项目时,我的PyCharm终端有以下错误:</p>
<pre><code>File "C:\Python34\lib\site-packages\xadmin\sites.py", line 10, in <module>
sys.setdefaultencoding("utf-8")
AttributeError: 'module' object has no attribute 'setdefaultencoding'
</code></pre>
<p>这是从xadmin插件的sites.py中提取的源代码:</p>
<pre><code>import sys
from functools import update_wrapper
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.base import ModelBase
from django.views.decorators.cache import never_cache
from imp import reload
reload(sys)
sys.setdefaultencoding("utf-8")
</code></pre>
<p>该项目使用Python3.4解释器和Django1.7.1运行。xadmin的版本是0.5.0</p>
<p>我能做什么?</p>