Jonas
Jonas

Reputation: 7915

Pipfile.lock out of date / cannot create regular file 'requirements.txt'

When I try to push my project to Heroku with git push heroku master I get this output:

remote: -----> Python app detected
remote:  !     Python has released a security update! Please consider upgrading to python-3.7.6
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: cp: cannot create regular file '/app/tmp/cache/.heroku/requirements.txt': No such file or directory
remote: -----> Installing python-3.7.3
remote: -----> Installing pip
remote: -----> Installing dependencies with Pipenv 2018.5.18…
remote:        Your Pipfile.lock (e78d47) is out of date. Expected: (d89661).
remote:        Aborting deploy.
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed

I have tried running pipenv lock but that didn't fix the problem.

My Pipfile looks like this:

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
flask = "*"
gunicorn = "*"
numpy = "*"
opencv-python = "*"

[requires]
python_version = "3.7"

Any ideas?

Upvotes: 0

Views: 934

Answers (1)

Chris
Chris

Reputation: 137099

I have tried running pipenv lock but that didn't fix the problem

Make sure to commit the modified Pipfile.lock and push your commit to Heroku. Just running that command locally won't do it.

Upvotes: 1

Related Questions