GithubHelp home page GithubHelp logo

Comments (18)

kennethreitz avatar kennethreitz commented on May 18, 2024

This is a limitation of the current tooling.

Ideally, we'd have cached downloads and install every dependency on every push. Unfortunately, modules with c extensions make this a bit impractical.

Luckily, I'm working on some tool that will fix this.

from heroku-buildpack-python.

aljosa avatar aljosa commented on May 18, 2024

any hack/tip which would allow me now to remove package piston?

if i don't remove it my app will never start and the only way i can think is to remove heroku app and create it again (not an option for this app).

maybe some way to reset virtualenv?

from heroku-buildpack-python.

kennethreitz avatar kennethreitz commented on May 18, 2024

The best thing to do at this time is flush the cache. You can ask support to do this for you.

from heroku-buildpack-python.

aljosa avatar aljosa commented on May 18, 2024

still waiting for support to reset virtualenv so i'm trying to find a way to fix this.
any way i can use a modified buildpack on an existing app?
any tips appreciated

from heroku-buildpack-python.

kennethreitz avatar kennethreitz commented on May 18, 2024

You can actually use the purge branch of this repo to do that :)

from heroku-buildpack-python.

aljosa avatar aljosa commented on May 18, 2024

thanks for suggestion but the part i didn't understand is if i can apply a different buildpack next time i push changes w/o delete/create heroku app?

from heroku-buildpack-python.

kennethreitz avatar kennethreitz commented on May 18, 2024

@aljosa yes, you can do the following:

$ heroku config:add BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-python.git

from heroku-buildpack-python.

ppp23 avatar ppp23 commented on May 18, 2024

this is still an issue for me and others it seems: http://stackoverflow.com/questions/14368027/how-can-i-flush-the-heroku-buildpack-cache-dir
i had to re-install the piston package from source for some unreleased fixes, but the old package still remains inside the site-packages.

from heroku-buildpack-python.

kennethreitz avatar kennethreitz commented on May 18, 2024

Specify a different runtime, and your cache will be purged.

https://devcenter.heroku.com/articles/python-runtimes#changing-runtimes

from heroku-buildpack-python.

ppp23 avatar ppp23 commented on May 18, 2024

ok, thank you, even if it would be nice to have an easier/quicker method, this works for me

from heroku-buildpack-python.

kennethreitz avatar kennethreitz commented on May 18, 2024

Indeed, it will be automatic one day, but some tools need to be written first ;)

from heroku-buildpack-python.

victorfontes avatar victorfontes commented on May 18, 2024

@kennethreitz Just saved mine and my customers life.

Looking foward for an easier way to do that on heroku.

from heroku-buildpack-python.

mightyiam avatar mightyiam commented on May 18, 2024

+1

from heroku-buildpack-python.

apragacz avatar apragacz commented on May 18, 2024

+1

from heroku-buildpack-python.

eroninjapan avatar eroninjapan commented on May 18, 2024

@kennethreitz Is modifying runtime.txt, deploying, reverting runtime.txt still the best method to accomplish purging the cached dependencies myself? I tried using the Heroku Repo plugin (https://github.com/heroku/heroku-repo) purge_cache command but it's not working as expected.

from heroku-buildpack-python.

kennethreitz avatar kennethreitz commented on May 18, 2024

Packages are now automatically uninstalled when removed from requirements.txt

from heroku-buildpack-python.

wooyek avatar wooyek commented on May 18, 2024

I have no versions in the requirements.txt. How can I make sure that the latest packages will be installed on deploy to heroku?

PS. No versions freeze is on purpose. I know it's not the best practice. but I want my CI to catch any incompatibilities as quicly as it can and I don't want to keep to versions of requirements file.

from heroku-buildpack-python.

wooyek avatar wooyek commented on May 18, 2024

For anyone who stumbles here, as a workaround you can use post_compile hook, eg.:

#!/usr/bin/env bash
# File path should be ./bin/post_compile
# https://gist.github.com/kylefox/7044491259b6b2586ca1

echo "UPGRADE_REQUIREMENTS: $UPGRADE_REQUIREMENTS"

if [[ "$UPGRADE_REQUIREMENTS" == "True" ]]; then
    echo "====> Upgrading requirements"
    pip install -r requirements.txt -U
fi
echo "====> Installed versions"
pip freeze

…or similar.

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.