GithubHelp home page GithubHelp logo

Comments (6)

djm avatar djm commented on June 9, 2024 1

That checks out! Thanks for the explanation and all the work on the Python buildpack 👍

from heroku-buildpack-python.

edmorley avatar edmorley commented on June 9, 2024

@djm Hi!

The Python 3.10.5 release on Heroku was the first for Heroku-{18,20} that has the Python binary built using the shared library. (For Heroku-22, the change was first introduced in Python 3.10.4.). The Heroku changelog site entry for that release links to the buildpack changelog which has some more details about those changes.

My guess would be that perhaps some environment variables are set (either on the app, or via earlier faulty buildpacks) that are interfering with the python binary's ability to locate the shared library. For example, LD_LIBRARY_PATH or similar.

Could you open a support ticket at https://help.heroku.com, making sure to grant access to your app, and then link to it here, so I can take a closer look?

from heroku-buildpack-python.

djm avatar djm commented on June 9, 2024

@edmorley

Spot on! PYTHONPATH, PATH, LD_LIBRARY_PATH & LIBRARY_PATH were all set which was a surprise to me having never done that myself. We've moved all environments back to relying on Heroku for those values.

Thanks very much Ed; I'll close this and hopefully it'll be helpful to someone else.

from heroku-buildpack-python.

edmorley avatar edmorley commented on June 9, 2024

@djm No problem! Thank you for confirming they were the cause.

I don't suppose you have the values they were set to, so I can try and see where they came from / if there is a way I can detect this case (vs valid usages of them)? To find historic env var values you can use heroku releases:info NNN where NNN will be the release version like v123 etc.

from heroku-buildpack-python.

djm avatar djm commented on June 9, 2024

@edmorley

Absolutely, but please take them with a pinch of salt; this particular app has been on Heroku since 2012!

LD_LIBRARY_PATH: /app/.heroku/vendor/lib
LIBRARY_PATH: /app/.heroku/vendor/lib
PATH: /app/.heroku/venv/bin:/bin:/usr/local/bin:/usr/bin
PYTHONPATH: /app/

from heroku-buildpack-python.

edmorley avatar edmorley commented on June 9, 2024

Thank you - that was helpful - I tracked those down to here:
https://github.com/heroku/heroku-buildpack-python/blob/v11/bin/release#L10-L18

In the very early days of this buildpack, it used to set some default env vars on newly created apps as part of their first build. I'll have a think about the best way to catch these cases to avoid other old apps being affected in the future.

from heroku-buildpack-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.