首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >过时的Pipfile.lock

过时的Pipfile.lock
EN

Stack Overflow用户
提问于 2018-03-25 08:39:47
回答 1查看 1.6K关注 0票数 1

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

代码语言:javascript
复制
git push heroku master

我已经设置了一个管道文件和requirements.txt。我添加了一个runtime.txt来指定我需要Python2.7。这也在Pipfile中。这是我从推送到heroku得到的:

代码语言:javascript
复制
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'

我不知道它为什么要安装Python3,它也不喜欢我的Pipfile.lock文件。我尝试删除它,并使用pipenv install重新生成它,但这并没有改变任何事情。

EN

回答 1

Stack Overflow用户

发布于 2018-04-07 03:43:53

确保你已经用pipenv --two在Python2.x中初始化了你的环境,然后--假设你的代码在本地运行,并且所有依赖项都在你的管道文件中指定--运行pipenv install并将包括Pipfile.lock在内的所有更改提交到你的本地git repo (git add * && git commit -m "your message")中。最后推送到heroku。希望它现在可以正确构建。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49471436

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档