5-2.安装xadmin的源码包,运行报错。截图如下。谢谢老师

来源:5-2 xadmin的安装

Sir_0001

2017-06-05

http://szimg.mukewang.com/5935792500019c2409420711.jpg

"D:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\bin\runnerw.exe" C:\Users\roc\Envs\mxonline\Scripts\python.exe E:/PycharmProjects/MxOnline/manage.py runserver 8000

Unhandled exception in thread started by <function wrapper at 0x00000000035AA7B8>

Traceback (most recent call last):

  File "C:\Users\roc\Envs\mxonline\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper

    fn(*args, **kwargs)

  File "C:\Users\roc\Envs\mxonline\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run

    autoreload.raise_last_exception()

  File "C:\Users\roc\Envs\mxonline\lib\site-packages\django\utils\autoreload.py", line 249, in raise_last_exception

    six.reraise(*_exception)

  File "C:\Users\roc\Envs\mxonline\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper

    fn(*args, **kwargs)

  File "C:\Users\roc\Envs\mxonline\lib\site-packages\django\__init__.py", line 18, in setup

    apps.populate(settings.INSTALLED_APPS)

  File "C:\Users\roc\Envs\mxonline\lib\site-packages\django\apps\registry.py", line 85, in populate

    app_config = AppConfig.create(entry)

  File "C:\Users\roc\Envs\mxonline\lib\site-packages\django\apps\config.py", line 90, in create

    module = import_module(entry)

  File "c:\python27\Lib\importlib\__init__.py", line 37, in import_module

    __import__(name)

  File "E:\PycharmProjects\MxOnline\extra_apps\xadmin\__init__.py", line 4, in <module>

    from xadmin.sites import AdminSite, site

  File "E:\PycharmProjects\MxOnline\extra_apps\xadmin\sites.py", line 3, in <module>

    from future.utils import iteritems

ImportError: No module named future.utils

通过pip安装的xadmin就没事。手动安装的xadmin源码就报错。

请问老师,这是什么情况?谢谢老师。

写回答

1回答

bobby

2017-06-07

pip install future 试试呢, 估计是xadmin后面的人提交commit 没有注意到兼容以前的代码,

0
3
慕侠2286034
可是,因为第一种安装方法没安装成功,直接第二种方法安装xadmin。现在又报错无crispy_forms模块。纠结
2018-06-10
共3条回复

Python3.6+django+xadmin,打造在线教育平台

【毕设】Python 2.7到3.6 完美适配,Django升级2.0

3677 学习 · 4038 问题

查看课程