Reputation: 11
These are errors I am getting, I can't post the entire log because of the character limit sorry.
Building wheel for psycopg2 (setup.py): started
Building wheel for psycopg2 (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mxd65ubh/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mxd65ubh/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-mfz2er96
cwd: /tmp/pip-install-mxd65ubh/psycopg2/
Second Error:
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
689 | while (interp->next)
| ^~
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Successfully built Pillow
Failed to build psycopg2
Installing collected packages: docutils, jmespath, six, python-dateutil, urllib3, botocore, s3transfer, boto3, certifi, chardet, dj-database-url, pytz, Django, django-crispy-forms, whitenoise, psycopg2, django-heroku, django-storages, gunicorn, idna, Pillow, requests
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'error'
Third Error:
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mxd65ubh/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mxd65ubh/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-08ru_8_3/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.9/psycopg2
cwd: /tmp/pip-install-mxd65ubh/psycopg2/
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
689 | while (interp->next)
| ^~
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mxd65ubh/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mxd65ubh/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-08ru_8_3/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.9/psycopg2 Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
This is my requirements.txt file
boto3==1.9.96
botocore==1.12.96 certifi==2018.10.15
chardet==3.0.4
dj-database-url==0.5.0
Django==2.1
django-crispy-forms==1.7.2
django-heroku==0.3.1
django-storages==1.7.1
docutils==0.14
gunicorn==19.9.0
idna==2.7 jmespath==0.9.3
Pillow==5.2.0
psycopg2==2.7.7
python-dateutil==2.8.0
pytz==2018.5
requests==2.19.1
s3transfer==0.2.0
six==1.12.0
urllib3==1.23
whitenoise==4.1.2
Upvotes: 1
Views: 379
Reputation: 163
Try to install psycopg2-binary with pip install psycopg2-binary
instead of psycopg2.
Upvotes: 0