Ошибка развертывания django на herkou posgress pip lock error [duplicate]

Я пытаюсь развернуть приложение Django на herokou. Я получаю piplock, который устарел.

 -----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> Using Python version specified in Pipfile.lock
-----> Installing python-3.8.12
-----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
-----> Installing dependencies with Pipenv 2020.11.15
       Your Pipfile.lock (a6086c) is out of date. Expected: (6ce893).
       [DeployException]:   File "/tmp/build_df99f796/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/decorators.py", line 73, in new_func
       [DeployException]:       return ctx.invoke(f, obj, *args, **kwargs)
       [DeployException]:   File "/tmp/build_df99f796/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
       [DeployException]:       return callback(*args, **kwargs)
       [DeployException]:   File "/tmp/build_df99f796/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/decorators.py", line 21, in new_func
       [DeployException]:       return f(get_current_context(), *args, **kwargs)
       [DeployException]:   File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/cli/command.py", line 233, in install
       [DeployException]:       retcode = do_install(
       [DeployException]:   File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/core.py", line 2052, in do_install
       [DeployException]:       do_init(
       [DeployException]:   File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/core.py", line 1251, in do_init
       [DeployException]:       raise exceptions.DeployException
       ERROR:: Aborting deploy
 !     Push rejected, failed to compile Python app.
 !     Push failed

Когда я пытаюсь обновить блокировку pip в pipenv, я получаю

pipenv lock
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Building requirements...
Resolving dependencies...
✘ Locking Failed! 
ERROR:pip.subprocessor:Command errored out with exit status 1:
 command: /Users/matthewsmith/.local/share/virtualenvs/devlog-XABMBIas/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/bq/46k05k255snbkf2x3fkzv0380000gn/T/pip-resolver-jdku7f8q/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/bq/46k05k255snbkf2x3fkzv0380000gn/T/pip-resolver-jdku7f8q/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/bq/46k05k255snbkf2x3fkzv0380000gn/T/pip-resolver-jdku7f8q/psycopg2/pip-egg-info
     cwd: /private/var/folders/bq/46k05k255snbkf2x3fkzv0380000gn/T/pip-resolver-jdku7f8q/psycopg2/
Complete output (20 lines):
running egg_info
creating /private/var/folders/bq/46k05k255snbkf2x3fkzv0380000gn/T/pip-resolver-jdku7f8q/psycopg2/pip-egg-info/psycopg2.egg-info
writing manifest file '/private/var/folders/bq/46k05k255snbkf2x3fkzv0380000gn/T/pip-resolver-jdku7f8q/psycopg2/pip-egg-info/psycopg2.egg-info/SOURCES.txt'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).

Но у меня есть двоичный файл postgres в моем requriments.txt и установлен в проекте

appdirs==1.4.4
asgiref==3.3.1
astroid==2.4.2
black==20.8b1
certifi==2020.12.5
cffi==1.14.4
chardet==4.0.0
click==7.1.2
cryptography==3.3.1
defusedxml==0.6.0
dj-database-url==0.5.0
Django==3.1.4
django-allauth==0.44.0
django-crispy-forms==1.10.0
django-heroku==0.3.1
gunicorn==20.1.0
idna==2.10
isort==5.6.4
lazy-object-proxy==1.4.3
mccabe==0.6.1
mypy-extensions==0.4.3
oauthlib==3.1.0
pathspec==0.8.1
Pillow==8.0.1
psycopg2-binary==2.9.3
pycparser==2.20
PyJWT==2.0.0
pylint==2.6.0
python3-openid==3.2.0
pytz==2020.4
regex==2020.11.13
requests==2.25.1
requests-oauthlib==1.3.0
sentry-sdk==1.5.4
six==1.15.0
sorl-thumbnail==12.7.0
sqlparse==0.4.1
toml==0.10.2
typed-ast==1.4.2
typing-extensions==3.7.4.3
urllib3==1.26.2
whitenoise==5.3.0
wrapt==1.12.1

Я застрял на этом всю неделю. Не знаю, что делать, чтобы решить эту проблему. Если у кого-нибудь есть идеи или предложения, я буду очень признателен.

Вернуться на верх