gpt4 book ai didi

python - Pipfile.lock 已过期

转载 作者:太空狗 更新时间:2023-10-29 16:53:38 28 4
gpt4 key购买 nike

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

git push heroku master

我已经设置了 Pipfile 和 requirements.txt。我添加了一个 runtime.txt 来指定我需要 python 2.7。这也在 Pipfile 中。这是我从推送到 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 再次生成它,但这并没有改变任何东西。

最佳答案

做项目的时候遇到同样的问题,在你push到Heroku的分支,运行

pipenv lock

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

关于python - Pipfile.lock 已过期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49460486/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com