0

I am trying to deploy new code at Heroku. The changes I made are simple, no changes to settings or requirements or anything fundamental.

However, when running git push, I get...

=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-python.git
=====> Detected Framework: Python
-----> Installing requirements with pip
       ImportError: No module named site
!     Push rejected, failed to compile Multipack app.
!     Push failed

Does anybody have a clue what may be going on here? I found similar questions already posted, but no clear answer and the proposed solutions didn't work in this case.

Heroku support suggested so far:

$ heroku config:unset PYTHONPATH
$ heroku config:unset PYTHONHOME

Following this, the deployment was possible, but the application stopped working. By adding those variables back, the application was online again, but deployment would again fail.

Looking for a Solution for two days now - I would appreciate any advice.

requirements.txt file is here.

4
  • Did you try heroku buildpacks:clear then heroku buildpacks:add heroku/python
    – ahmed
    Commented Aug 31, 2017 at 17:50
  • I have a config var BUILDPACK_URL github.com/heroku/heroku-buildpack-multi.git. When running heroku buildpacks:clear I get The BUILDPACK_URL config var is still set and will be used for the next release Removing the variable and executing the suggested steps did not fix the problem. I get the same error.
    – apiljic
    Commented Aug 31, 2017 at 18:10
  • can you share your requirements.txt file?
    – ahmed
    Commented Aug 31, 2017 at 18:39
  • Updated the question with the link to the file.
    – apiljic
    Commented Aug 31, 2017 at 18:56

1 Answer 1

1

In this case, the solution to the problem is to remove only the PYTHONHOME variable. The other variable is needed.

The reason was a change in heroku-buildpack-python.

More info here: https://github.com/heroku/heroku-buildpack-python/issues/457

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.