Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/337.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
找不到Heroku Python Webapp-pip,尽管runtime.txt,但runtime是默认值_Python_Git_Heroku_Web Applications_Deployment - Fatal编程技术网

找不到Heroku Python Webapp-pip,尽管runtime.txt,但runtime是默认值

找不到Heroku Python Webapp-pip,尽管runtime.txt,但runtime是默认值,python,git,heroku,web-applications,deployment,Python,Git,Heroku,Web Applications,Deployment,我是一个新手,不理解很多概念,所以如果我的陈述和问题中有一些含糊不清或明显的谬误,请原谅 我正在使用flaskpython框架编写一个web应用程序。我已经在localhost上测试过了。现在我想把它部署到heroku的Web服务器上 以下是存储主要文件的文件夹: static #this is a folder templates #this is a folder Procfile requirements.txt runtime.txt app.py 下面分别是Procfile、requ

我是一个新手,不理解很多概念,所以如果我的陈述和问题中有一些含糊不清或明显的谬误,请原谅

我正在使用flaskpython框架编写一个web应用程序。我已经在localhost上测试过了。现在我想把它部署到heroku的Web服务器上

以下是存储主要文件的文件夹:

static #this is a folder
templates #this is a folder
Procfile
requirements.txt
runtime.txt
app.py
下面分别是Procfile、requirements.txt和runtime.txt的内容:

程序文件:

web: gunicorn app:app
requirements.txt:

 Flask==0.12.2
 gunicorn==19.7.1
 itsdangerous==0.24
 Jinja2==2.9.6
 MarkupSafe==1.0
 Werkzeug==0.12.2
runtime.txt:

 python-2.7.1
现在,它是runtime.txt中的python-3.5.1,在出现问题之前,但在调试期间,我将其保留为2.7.1,因为我发现了另一个问题

现在,当我尝试执行命令:git push heroku master时,会生成以下ouptut:

Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (13/13), 1.95 KiB | 0 bytes/s, done.
Total 13 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing python-3.5.1
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:     

/app/tmp/buildpacks/{somelonghash}/bin/steps/pip-
install: line 7: /app/.heroku/python/bin/pip: No such file or 
directory

remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to joecrownwebapp.
remote: 
To https://git.heroku.com/joecrownwebapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 
'https://git.heroku.com/joecrownwebapp.git'
其中,{somelonghash}是一个长哈希,为了这个问题的目的,我已经删除了它。现在,正如您首先看到的,应用程序是用python-3.5.1部署的,这很奇怪,因为我在runtime.txt中指定了运行时应该是例如2.7.1。现在,我们还看到正在安装pip,然后需求将与pip一起安装,这就是问题所在

我想到的第一个问题是:这个“/app/.heroku/python/bin/pip:“应该是哪个目录,或者就此而言“/app/tmp/buildpacks/{somelonghash}/bin/steps/pip”到底在哪里- 安装“

它们在我的机器上吗?(我认为这不是因为如果它们是基于unix的路径名,那么应用程序应该直接位于根目录下,但我没有这样的文件夹)

如果它们不在我的机器上,它们在哪里,我如何定位它们并检查它们。他们在Heroku服务器上的某个地方。如果是,我的问题从何而来?为什么我的runtime.txt被忽略

任何想法都将不胜感激