老师xadmin安装问题
启动服务器报错代码:
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
(django) C:\Users\Administrator\Desktop\py_learn\django_mall>python manage.py runserver
Performing system checks...
Exception ignored in thread started by: <function check_errors.<locals>.wrapper at 0x0000000004004040>
Traceback (most recent call last):
File "C:\envs\django\lib\site-packages\django\utils\autoreload.py", line 228, in wrapper
fn(*args, **kwargs)
File "C:\envs\django\lib\site-packages\django\core\management\commands\runserver.py", line 124, in inner_run
self.check(display_num_errors=True)
File "C:\envs\django\lib\site-packages\django\core\management\base.py", line 356, in check
all_issues = self._run_checks(
File "C:\envs\django\lib\site-packages\django\core\management\base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "C:\envs\django\lib\site-packages\django\core\checks\registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "C:\envs\django\lib\site-packages\django\core\checks\urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "C:\envs\django\lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver
return check_method()
File "C:\envs\django\lib\site-packages\django\urls\resolvers.py", line 256, in check
for pattern in self.url_patterns:
File "C:\envs\django\lib\site-packages\django\utils\functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\envs\django\lib\site-packages\django\urls\resolvers.py", line 407, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\envs\django\lib\site-packages\django\utils\functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\envs\django\lib\site-packages\django\urls\resolvers.py", line 400, in urlconf_module
return import_module(self.urlconf_name)
File "d:\python\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Administrator\Desktop\py_learn\django_mall\django_mall\urls.py", line 21, in <module>
from extra_apps import xadmin
File "C:\Users\Administrator\Desktop\py_learn\django_mall\extra_apps\xadmin\__init__.py", line 4, in <module>
from xadmin.sites import AdminSite, site
File "C:\Users\Administrator\Desktop\py_learn\django_mall\extra_apps\xadmin\__init__.py", line 4, in <module>
from xadmin.sites import AdminSite, site
File "C:\Users\Administrator\Desktop\py_learn\django_mall\extra_apps\xadmin\sites.py", line 3, in <module>
from future.utils import iteritems
ModuleNotFoundError: No module named 'future'
老师我根据安装教程安装了xadmin和设置了,不知道哪里有问题,还有执行python manage.pu migrate也报错
正在回答 回答被采纳积分+1
同学,你好
1、可以先用pip list命令查看xadmin的依赖是否都安装成功了,如:
django>=1.9.0
django-crispy-forms>=1.6.0
django-import-export>=0.5.1
django-reversion>=2.0.0
django-formtools==1.0
future==0.15.2
httplib2==0.9.2
six==1.10.0
从错误信息看future是没有安装的
2、如果没有安装,可以执行以下命令进行安装:pip install xx进行安装
3、然后再重新启动服务器
加油,祝学习愉快~~~
- 参与学习 人
- 提交作业 218 份
- 解答问题 3562 个
本阶段带你用Python开发一个网站,学习主流框架Django+Flask是Python Web开发的第一步,在基础知识上实现积分商城的项目开发,体验真实的项目开发流程,提高解决编程问题和效率的能力。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星