1
(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.

I am following the instructions on this page:

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

However I am unsure why it is not installing.

Is there anyway to get more verbose data on the error? I'm trying to google each of these lines and nothing is consistent with the issue I am having.

Could it be due to Python version?

This is on OSX - High Sierra. Do I possibly need to do something to let Django CMS connect to my database?

Steven Matthews
  • 9,705
  • 45
  • 126
  • 232

1 Answers1

2

In case anyone else runs into this issue, or if the OP never solved it, I encountered the same issue tonight and it looks like python 3.7 is indeed the culprit.

djangocms (currently) only supports up to Django 1.11, which does not appear to support python 3.7. Django 1.11 release notes

What tipped me off was re-running the install with the --verbose option and seeing this line:

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

A quick google search appeared to confirm that this is an issue with python3.7/Django 1.11 a la stack overflow.

According to the djangocms roadmap, Divio is leading development on the next major release which will include Django 2.0 (and thus python3.7, presumably) support.

In the meantime, you'll probably have to stick with python3.6, since djangocms' docs claim support for 3.6, even though the tutorial only lists up to python3.4.

Good luck!

ajbeattie
  • 36
  • 2
  • Yep, this is correct. There's a workaround where you can change the library's code - I'll accept your answer and include a link to that solution (what I ultimately used to solve it) – Steven Matthews Sep 11 '18 at 21:15