Pipfile.lock out of date

2024/11/20 13:33:09

I'm trying to deploy a large django project to heroku. I installed Heroku CLI, logged in, created an app and ran:

git push heroku master

I have a Pipfile and requirements.txt already set up. I added a runtime.txt to specify that I need python 2.7. This is also in the Pipfile. This is what I get from pushing to heroku:

$ git push heroku master
Counting objects: 12159, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4853/4853), done.
Writing objects: 100% (12159/12159), 20.94 MiB | 1.82 MiB/s, done.
Total 12159 (delta 6859), reused 12036 (delta 6751)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing python-3.6.4
remote: -----> Installing pip
remote: -----> Installing dependencies with Pipenv 11.8.2…
remote:        Your Pipfile.lock (3b2ba9) is out of date. Expected: (83a5b4).
remote:        Aborting deploy.
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy....
remote: 
remote: !   Push rejected to camp-infinity.
remote: 
To https://git.heroku.com/camp-infinity.git! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/camp-infinity.git'

For some reason it tries to install python 3, and it also doesn't like my Pipfile.lock file. I've tried deleting it and generating it again with pipenv install but that didn't change anything.

Answer

Experienced the same problem while working on a project, in the branch you are pushing to Heroku, run

pipenv lock

and it will update the Pipfile.lock file. :)

https://en.xdnf.cn/q/26316.html

Related Q&A

Can a simple difference in Python3 variable names alter the way code runs? [duplicate]

This question already has answers here:Python attributeError on __del__(2 answers)Closed 9 years ago.This code...class Person:num_of_people = 0def __init__(self, name):self.name = namePerson.num_of_peo…

Easy way to check that a variable is defined in python? [duplicate]

This question already has answers here:How do I check if a variable exists?(15 answers)Closed 10 years ago.Is there any way to check if a variable (class member or standalone) with specified name is d…

Adding install_requires to setup.py when making a python package

To make a python package, in setup.py, I have the following: setup(name=TowelStuff,version=0.1.0,author=J. Random Hacker,author_email=[email protected],packages=[towelstuff, towelstuff.test],scripts=[b…

pyqt: how to remove a widget?

I have a QGroupBox widget with children in it that I want to remove. How do I do that? I cant find any removeWidget, removeChild, removeItem, or anything similar in the docs. I can only see how to rem…

ValueError: cannot switch from manual field specification to automatic field numbering

The class:class Book(object):def __init__(self, title, author):self.title = titleself.author = authordef get_entry(self):return "{0} by {1} on {}".format(self.title, self.author, self.press)C…

Retrieve name of column from its Index in Pandas

I have a pandas dataframe and a numpy array of values of that dataframe. I have the index of a specific column and I already have the row index of an important value. Now I need to get the column name …

Purpose of return self python

I have a problem with return selfclass Fib: def __init__(self, max):self.max = maxdef __iter__(self): self.a = 0self.b = 1return selfdef __next__(self):fib = self.aif fib > self.max:raise StopIterat…

tempfile.TemporaryDirectory context manager in Python 2.7

Is there a way to create a temporary directory in a context manager with Python 2.7?with tempfile.TemporaryDirectory() as temp_dir:# modify files in this dir# here the temporary diretory does not exis…

Matplotlib returning a plot object

I have a function that wraps pyplot.plt so I can quickly create graphs with oft-used defaults:def plot_signal(time, signal, title=, xlab=, ylab=,line_width=1, alpha=1, color=k,subplots=False, show_grid…

Where is the history file for ipython

I can not determine where the ipython is storing its history.a. There is no ~/.pythonhistory:12:49:00/dashboards $ll ~/.py* ls: /Users/steve/.py*: No such file or directoryb. Nothing special in the pyt…