awesto/cookiecutter-django-shop

Pipfile requirements cannot be fulfilled (cause: djangocms-cascade)

Opened this issue ยท 18 comments

What happened?

full install cannot be fulfilled due to incompatibility of djangocms-cascade requirements

Steps to reproduce

https://dpaste.org/ReXu

Any solution please ๐Ÿ˜”

I'm having the same issue. If you just want to build/run the local demo you can use

pipenv install --sequential --skip-lock

It should still install the dependencies but you're pretty much stuck if you want to use the docker version.

I understand, it is a forced solution, it gives a lot of uncertainty, does anyone know what is the incompatibility? Other solution?

It's definitely not a good solution and doesn't work properly for docker setups. If you have a list of all of the requirements then you could modify the Cookiecutter to generate them yourself, but again, this is not ideal.

I think I have a workaround now to get the runserver Docker going.

In the folder where your Cookiecutter is being downloaded (~/.cookiecutters for me) look for the cookiecutter-django-shop/hooks directory. There should be a file called post_gen_project.py

Replace the pipenv_to_requirements function with the following:

def pipenv_to_requirements():

    req=['Django>=2.1,<3.1',
         'django-shop==1.2.4',
         'django-allauth',
          'django-angular>=2.3',
          'django-filer',
          'django-ipware',
          'django-sass-processor',
          'django-select2',
          'django-filter',
          'django-parler',
          'django-parler-rest',
          'psycopg2-binary<2.8',
          'django-redis-cache',
          'django-redis-sessions',
          'schedule',
          'uWSGI',
          'djangorestframework',
          'django-rest-auth',
          'django-polymorphic>=2.1',
          'django-admin-sortable2',
          'django-fsm',
          'django-fsm-admin',
          'django-phonenumber-field',
          'django-post_office',
          'phonenumbers',
          'django-cms>=3.7.2',
          'djangocms-bootstrap',
          'djangocms-cascade>=1.3.1',
          'djangocms-text-ckeditor>=3.9.1',
          'libsass',
          'django-shop>=1.2.1',
          'django-elasticsearch-dsl',
          'elasticsearch-dsl>=7',
          'djangoshop-stripe>=1.2',
          'stripe<2',
          'djangoshop-paypal>=1.2',
          'paypalrestsdk<2',
          'djangoshop-sendcloud>=1.2',
          'django-treebeard==4.4'
          ]
      with open('requirements.txt', 'w') as fh:
          for line in req:
              fh.write("{}\n".format(line))

Run the Cookiecutter again but DO NOT redownload the files (first question in the process, just say no!). I haven't tested everything but it should work like normal again. Or at least until the dev team has a better idea of what's going on/way forward.

And what does the development team say why it does not comment on it. Will there be any solid and stable improvements to start a store from now on?

It seems from the other threads that they're at least aware of it. I'm sure they're trying their damndest to figure it out.

I hope they solve it, I will be attentive, please let me know any news

jrief commented

OK. I'll have a look soon.
Everything used to work, but I didn't pin requirements to an upper version, so after Django's ecosystem evolved, things started to break. I'm currently buried in other feature requests.

so after Django's ecosystem evolved, things started to break.

As is tradition.

OK. I'll have a look soon.
Everything used to work, but I didn't pin requirements to an upper version, so after Django's ecosystem evolved, things started to break. I'm currently buried in other feature requests.

Thank you very much, I will be very attentive to the update solution

I think I have a workaround now to get the runserver Docker going.

In the folder where your Cookiecutter is being downloaded (~/.cookiecutters for me) look for the cookiecutter-django-shop/hooks directory. There should be a file called post_gen_project.py

Replace the pipenv_to_requirements function with the following:

def pipenv_to_requirements():

    req=['Django>=2.1,<3.1',
         'django-shop==1.2.4',
         'django-allauth',
          'django-angular>=2.3',
          'django-filer',
          'django-ipware',
          'django-sass-processor',
          'django-select2',
          'django-filter',
          'django-parler',
          'django-parler-rest',
          'psycopg2-binary<2.8',
          'django-redis-cache',
          'django-redis-sessions',
          'schedule',
          'uWSGI',
          'djangorestframework',
          'django-rest-auth',
          'django-polymorphic>=2.1',
          'django-admin-sortable2',
          'django-fsm',
          'django-fsm-admin',
          'django-phonenumber-field',
          'django-post_office',
          'phonenumbers',
          'django-cms>=3.7.2',
          'djangocms-bootstrap',
          'djangocms-cascade>=1.3.1',
          'djangocms-text-ckeditor>=3.9.1',
          'libsass',
          'django-shop>=1.2.1',
          'django-elasticsearch-dsl',
          'elasticsearch-dsl>=7',
          'djangoshop-stripe>=1.2',
          'stripe<2',
          'djangoshop-paypal>=1.2',
          'paypalrestsdk<2',
          'djangoshop-sendcloud>=1.2'
          ]
      with open('requirements.txt', 'w') as fh:
          for line in req:
              fh.write("{}\n".format(line))

Run the Cookiecutter again but DO NOT redownload the files (first question in the process, just say no!). I haven't tested everything but it should work like normal again. Or at least until the dev team has a better idea of what's going on/way forward.

Thank you very much I can bypass it now

Thank you very much I can bypass it now

No worries. Make sure that you the list to include 'django-treebeard==4.4' as the latest version causes issues.

see here:
#44 (comment)

I've updated my original reply to include it now.

I am facing this same issue, I want to know what the dev teams response is

The problem is that Django-shop runs on 3.0 at most and djangocms-cascade-2 needs Django 3.1 for some native JSON field support. So you need to add ,<2 to the djangocms-cascade line in Pipfile, and wherever else that dep shows up.

Run the Cookiecutter again but DO NOT redownload the files (first question in the process, just say no!).

Unfortunately, Cookiecutter finishes with Error: "my-shop" directory already exists and there seem to be no changes.

After creating project through cookiecutter with all default answers, manually edit Pipfile:

  1. Replace the line djangocms-cascade = ">=1.3.1" with djangocms-cascade = ">=1.3.1,<2.0.0", per this suggestion
  2. Add the line django-treebeard = "4.4", per this suggestion
    On Ubuntu 16.04 prior to running pipenv install one also needs to export CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 and export ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1.
    pipenv install is then able to lock and install. To avoid compilation errors, instead of npm install run
npm i jquery@1.9.1 --save
npm i popper.js@^1.16.1 --save
npm install --no-optional

Then the remaining commands from tutorial get you functional page on localhost:8000.

#41 (comment)
A bit less "invasive" way to build dockerized version is to clone the repo locally git clone https://github.com/awesto/cookiecutter-django-shop, navigate to cookiecutter-django-shop/{{cookiecutter.project_slug}} and manually edit Pipfile there:

  1. Replace the line djangocms-cascade = ">=1.3.1" with djangocms-cascade = ">=1.3.1,<2.0.0", per this suggestion
  2. Add the line django-treebeard = "4.4", per this suggestion
    Cooikecutter the project from local clone with corrected Pipfile: cookiecutter cookiecutter-django-shop. Answering 3 for uwsgi, use_compressor [n]: y and debug [y]: n builds the dockerized django-shop version, browse to http://<virtual host>:9009 for functional page.