Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django 过期的Pipfile.lock_Django_Heroku - Fatal编程技术网

Django 过期的Pipfile.lock

Django 过期的Pipfile.lock,django,heroku,Django,Heroku,我正在尝试向heroku部署一个大型django项目。我安装了Heroku CLI,登录,创建了一个应用程序并运行: git push heroku master 我已经设置了一个Pipfile和requirements.txt。我添加了一个runtime.txt来指定我需要python 2.7。这也在PIP文件中。这是我从推动heroku中得到的: Counting objects: 12159, done. Delta compression using up to 2 threads.

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

git push heroku master
我已经设置了一个Pipfile和requirements.txt。我添加了一个runtime.txt来指定我需要python 2.7。这也在PIP文件中。这是我从推动heroku中得到的:

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安装再次生成它,但这并没有改变任何事情。

请确保已使用
pipenv--two在Python2.X中初始化您的环境,然后-如果您的代码在本地运行,并且所有依赖项都在Pipfile中指定-运行
pipenv安装
并将所有更改(包括
Pipfile.lock
提交到本地git repo(
git add*&&git commit-m“your message”
)。最后推到heroku。希望它现在能够正确构建。

看看这个:,它可能会帮助您解决问题。可能会重复