0

I am using Python 3.7.0, Django 3.0.4, and trying to host in Heroku. I am using windows OS and the most solution I found is on Linux. Every time I tried to push into the master of Heroku, it occurs the following error. Could anyone please help me out?

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
Toufiqur Rahman
  • 202
  • 3
  • 17
  • Does this answer your question? [Installing pdftotext library on heroku](https://stackoverflow.com/questions/54327005/installing-pdftotext-library-on-heroku) – iklinac Jun 07 '20 at 18:03
  • I see that answer is for Linux. – Toufiqur Rahman Jun 07 '20 at 18:04
  • First of all you didn't found solution yourself, as you asked this question an hour ago without any details (no attempt or any research on your behalf), second thing is that you deploy to Heroku and process is same no matter which OS you have installed locally – iklinac Jun 07 '20 at 18:17
  • @iklinac Hi thanks for your comment. If I would find my solution, I would never ask in here. I have tried their solutions new error comes up. – Toufiqur Rahman Jun 07 '20 at 18:27
  • 1
    So, what is error that comes up, maybe it is not related to this. You have posted same error again with same question. Have you tried to read error that comes up and try to understand what exactly it means. – iklinac Jun 07 '20 at 18:29

1 Answers1

1

If you're deploying to Heroku, you're likely deploying to Ubuntu Linux (version 16 or 18, depending what you've selected):

https://devcenter.heroku.com/articles/stack

I don't use Heroku, but this looks like you're missing necessary development libraries. You'll need to install libpoppler-cpp-dev. If you had your own Ubuntu installation, this is what you'd do:

apt-get install libpoppler-cpp-dev

However, I believe you'll need to use this to install via apt on Heroku: https://github.com/heroku/heroku-buildpack-apt

Good luck!

FlipperPA
  • 13,607
  • 4
  • 39
  • 71