【问题标题】:Cryptic Django CMS install error - what might be causing this error?神秘的 Django CMS 安装错误 - 可能导致此错误的原因是什么?
【发布时间】:2023-04-01 11:23:01
【问题描述】:
(env) Name-MacBook-Pro-2:site_cms name$ djangocms -f -p . site_cms
Creating the project
Please wait while I install dependencies
If I am stuck for a long time, please check for connectivity / PyPi issues
Dependencies installed
Creating the project
The installation has failed.


*****************************************************************

Check documentation at https://djangocms-installer.readthedocs.io

*****************************************************************

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/djangocms", line 11, in <module>
    sys.exit(execute())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/djangocms_installer/main.py", line 44, in execute
    django.setup_database(config_data)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/djangocms_installer/django/__init__.py", line 407, in setup_database
    command, env=env, stderr=subprocess.STDOUT
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 376, in check_output
    **kwargs).stdout
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 468, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7', '-W', 'ignore', 'manage.py', 'migrate']' returned non-zero exit status 1.

我正在按照此页面上的说明进行操作:

http://docs.django-cms.org/en/develop/introduction/01-install.html

但是我不确定为什么它没有安装。

是否有更多关于错误的详细数据?我正在尝试用谷歌搜索这些行中的每一行,但没有任何内容与我遇到的问题一致。

会不会是Python版本的原因?

这是在 OSX - High Sierra 上。我可能需要做一些事情来让 Django CMS 连接到我的数据库吗?

【问题讨论】:

    标签: python django


    【解决方案1】:

    如果其他人遇到这个问题,或者如果 OP 从未解决它,我今晚遇到了同样的问题,看起来 python 3.7 确实是罪魁祸首。

    djangocms(目前)最多只支持 Django 1.11,它似乎不支持 python 3.7Django 1.11 release notes

    提示我的是使用 --verbose 选项重新运行安装并看到这一行:

    '%s=%s' % (k, v) for k, v in params.items(),
    ^
    SyntaxError: Generator expression must be parenthesized
    

    Google 的快速搜索似乎确认这是 python3.7/Django 1.11 的问题 stack overflow

    根据 djangocms roadmap 的说法,Divio 正在领导下一个主要版本的开发,其中将包括 Django 2.0(因此可能是 python3.7)支持。

    与此同时,您可能不得不坚持使用 python3.6,因为 djangocms 的 docs 声称支持 3.6,即使 tutorial 只列出了 python3.4。

    祝你好运!

    【讨论】:

    • 是的,这是正确的。有一种解决方法,您可以更改库的代码 - 我会接受您的回答并包含指向该解决方案的链接(我最终用来解决它的)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多