openshift-instruqt / blog-django-py

Sample blog application implemented using Python and Django.
44 stars 322 forks source link

"oc new-app" build failure on postgresql-client (psycopg2) - Deploying Applications From Source/Topic 6 - Deploying Using the Command Line #7

Open based3 opened 3 years ago

based3 commented 3 years ago

With oc new-app python:latest~https://github.com/openshift-katacoda/blog-django-py or oc new-app --strategy=source https://github.com/openshift-katacoda/blog-django-py --name blog-from-source-auto

oc build fails with the error: psycopg/psycopgmodule.c:685:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’} while (interp->next) ^~ error: command 'gcc' failed with exit status 1

Pre-build psycopg2 package exists: https://pypi.org/project/psycopg2-binary/

ref: https://github.com/psycopg/psycopg2/issues/854

based3 commented 3 years ago

the real fix working is psycopg2-binary==2.8.6

based3 commented 3 years ago

you can use:

git clone https://github.com/based3/blog-django-py