Why don't these apt-packages behave the same on Ubuntu and Heroku?

前端 未结 1 855
攒了一身酷
攒了一身酷 2021-01-13 10:04

I want to use ZBar from Python on Heroku. On a regular Ubuntu 14.04 server I can run either

sudo apt-get install python-qrtools

-- OR --

相关标签:
1条回答
  • 2021-01-13 10:36

    With the amazing help of @PadraicCunningham I managed to find the solution. The problem turned out to be that heroku-buildpack-apt installs things in a newly created folder /app/.apt/ which was not in the PYTHONPATH.

    So I added the relevant folder to my PYTHONPATH on heroku as follows:

    heroku config:add PYTHONPATH=/app/.apt/usr/lib/python2.7/dist-packages/
    

    This solved the issue. Again a big thanks to PadraicCunningham for helping me to find this issue!

    0 讨论(0)
提交回复
热议问题