安装xadmin 出现版本兼容问题
pip install git+git://github.com/sshwsfc/xadmin.git 安装xadmin 出现版本兼容问题
Successfully built xadmin httplib2 future markuppy odfpy et-xmlfile
ERROR: django-import-export 2.3.0 has requirement Django>=2.0, but you'll have django 1.11.29 which is in
compatible.
Installing collected packages: django-crispy-forms, django-reversion, django-formtools, markuppy, defused
xml, odfpy, xlrd, xlwt, jdcal, et-xmlfile, openpyxl, pyyaml, tablib, diff-match-patch, django-import-expo
rt, httplib2, future, six, xadmin
Successfully installed defusedxml-0.6.0 diff-match-patch-20200713 django-crispy-forms-1.9.2 django-formto
ols-2.2 django-import-export-2.3.0 django-reversion-3.0.8 et-xmlfile-1.0.1 future-0.18.2 httplib2-0.9.2 j
dcal-1.4.1 markuppy-1.14 odfpy-1.4.1 openpyxl-3.0.5 pyyaml-5.3.1 six-1.15.0 tablib-2.0.0 xadmin-0.6.1 xlr
d-1.2.0 xlwt-1.3.0
WARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.
You should consider upgrading via the 'E:\envs\py3.72-GY0UNFYD\Scripts\python.exe -m pip install --upgrade pip' command.
(py3.72) E:\python-project\django_malls>python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\core\management\__init__.py", line 364, in execu
te_from_command_line
utility.execute()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\core\management\__init__.py", line 338, in execu
te
django.setup()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\apps\registry.py", line 116, in populate
app_config.ready()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\contrib\admin\apps.py", line 23, in ready
self.module.autodiscover()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\contrib\admin\__init__.py", line 26, in autodisc
over
autodiscover_modules('admin', register_to=site)
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\utils\module_loading.py", line 50, in autodiscov
er_modules
import_module('%s.%s' % (app_config.name, module_to_search))
File "c:\python372\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\reversion\admin.py", line 10, in <module>
from django.urls import reverse, re_path
ImportError: cannot import name 're_path' from 'django.urls' (E:\envs\py3.72-GY0UNFYD\lib\site-packages\d
jango\urls\__init__.py)
(py3.72) E:\python-project\django_malls>python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\core\management\__init__.py", line 364, in execu
te_from_command_line
utility.execute()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\core\management\__init__.py", line 338, in execu
te
django.setup()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\apps\registry.py", line 116, in populate
app_config.ready()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\contrib\admin\apps.py", line 23, in ready
self.module.autodiscover()
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\contrib\admin\__init__.py", line 26, in autodisc
over
autodiscover_modules('admin', register_to=site)
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\django\utils\module_loading.py", line 50, in autodiscov
er_modules
import_module('%s.%s' % (app_config.name, module_to_search))
File "c:\python372\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "E:\envs\py3.72-GY0UNFYD\lib\site-packages\reversion\admin.py", line 10, in <module>
from django.urls import reverse, re_path
ImportError: cannot import name 're_path' from 'django.urls' (E:\envs\py3.72-GY0UNFYD\lib\site-packages\d
jango\urls\__init__.py)
现在我该怎么办, 把django升级到2.0嘛? 这样的话对后面的视频操作会有影响的吧。
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 218 份
- 解答问题 3562 个
本阶段带你用Python开发一个网站,学习主流框架Django+Flask是Python Web开发的第一步,在基础知识上实现积分商城的项目开发,体验真实的项目开发流程,提高解决编程问题和效率的能力。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星