Pipfile.lock 已过期 [英] Pipfile.lock out of date

查看:29
本文介绍了Pipfile.lock 已过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一个大型 django 项目部署到 heroku.我安装了 Heroku CLI,登录,创建了一个应用程序并运行:

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

我已经设置了一个 Pipfile 和 requirements.txt.我添加了一个 runtime.txt 来指定我需要 python 2.7.这也在 Pipfile 中.这就是我从推送到 heroku 中得到的:

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'

出于某种原因,它试图安装 python 3,它也不喜欢我的 Pipfile.lock 文件.我试过删除它并使用 pipenv install 重新生成它,但这并没有改变任何东西.

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.

推荐答案

在做一个项目时遇到同样的问题,在你推送到 Heroku 的分支中,运行

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

pipenv lock

它会更新 Pipfile.lock 文件.:)

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

这篇关于Pipfile.lock 已过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆