首页 > 解决方案 > 在 Heroku 上部署 Django

问题描述

我正在尝试在 heroku 上部署我的 django 应用程序并不断收到此错误消息:

           ----------------------------------------
       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-xo9jsddf/psycopg2/setup.py'"'"';
 __file__='"'"'/tmp/pip-install-xo9jsddf/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-xuxym03s/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

我有我的 Procfile 和 requirements.txt。任何帮助表示赞赏!

标签: pythondjangoheroku

解决方案


推荐阅读