Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jhonvidal opened this issue Feb 12, 2021 · 18 comments
Open

Comments

@jhonvidal
Copy link
Contributor

What happened?

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

Steps to reproduce

https://dpaste.org/ReXu

@jhonvidal
Copy link
Contributor Author

Any solution please 😔

@ay0000
Copy link

ay0000 commented Feb 15, 2021

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.

@jhonvidal
Copy link
Contributor Author

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

@ay0000
Copy link

ay0000 commented Feb 16, 2021

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.

@ay0000
Copy link

ay0000 commented Feb 16, 2021

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.

@jhonvidal
Copy link
Contributor Author

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?

@ay0000
Copy link

ay0000 commented Feb 17, 2021

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.

@jhonvidal
Copy link
Contributor Author

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

@jrief
Copy link
Member

jrief commented Feb 18, 2021

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.

@ay0000
Copy link

ay0000 commented Feb 19, 2021

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

As is tradition.

@jhonvidal
Copy link
Contributor Author

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

@alsolskjaer
Copy link

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

@ay0000
Copy link

ay0000 commented Feb 20, 2021

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.

@hero4barca
Copy link

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

@greyhare
Copy link

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.

@Turmer
Copy link

Turmer commented Jul 28, 2021

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.

@Turmer
Copy link

Turmer commented Aug 11, 2021

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.

@Turmer
Copy link

Turmer commented Aug 25, 2021

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants