【发布时间】:2020-06-07 17:49:03
【问题描述】:
我正在使用 Python 3.7.0、Django 3.0.4,并尝试在 Heroku 中托管。我正在使用 Windows 操作系统,我发现的大多数解决方案是在 Linux 上。每次我尝试推入 Heroku 的 master 时,都会出现以下错误。谁能帮帮我?
ERROR: Command errored out with exit status 1:
remote: command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vu13x6kn/pdftotext/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vu13x6kn/pdftotext/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-quoxq88r
remote: cwd: /tmp/pip-install-vu13x6kn/pdftotext/
remote: Complete output (14 lines):
remote: /app/.heroku/python/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
remote: warnings.warn(msg)
remote: running bdist_wheel
remote: running build
remote: running build_ext
remote: building 'pdftotext' extension
remote: creating build
remote: creating build/temp.linux-x86_64-3.6
remote: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 -I/app/.heroku/python/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall
remote: pdftotext.cpp:3:10: fatal error: poppler/cpp/poppler-document.h: No such file or directory
remote: #include <poppler/cpp/poppler-document.h>
remote: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
remote: compilation terminated.
remote: error: command 'gcc' failed with exit status 1
remote: ----------------------------------------
remote: ERROR: Failed building wheel for pdftotext
【问题讨论】:
-
这能回答你的问题吗? Installing pdftotext library on heroku
-
我知道答案是针对 Linux 的。
-
首先你自己没有找到解决方案,因为你在一小时前问了这个问题,没有任何细节(没有尝试或代表你进行任何研究),第二件事是你部署到 Heroku 和无论您在本地安装哪个操作系统,过程都是相同的
-
@iklinac 您好,感谢您的评论。如果我能找到我的解决方案,我永远不会在这里问。我已经尝试了他们的解决方案,出现了新错误。
-
那么,出现了什么错误,可能与此无关。您再次发布了同样的错误和同样的问题。您是否尝试过阅读出现的错误并尝试理解它的确切含义。
标签: python django heroku pdftotext