Python应用程序的Heroku推送被拒绝

2024-10-01 04:44:53 发布

您现在位置:Python中文网/ 问答频道 /正文

有人见过类似的错误吗?我正在尝试部署一个Python应用程序,我有一个Procfile,一个要求.txt文件和运行时.txt文件-这些都来自this教程,以防您认为错误可能在这些文件中。在

我应该创建一个设置.py归档并留空?在

$ git push heroku master

Counting objects: 19, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (19/19), 2.33 KiB | 0 bytes/s, done.
Total 19 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing python-2.7.13
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        Collecting bottle==0.12.13 (from -r /tmp/build_e78d8cbc61bd247692c3369f3d1a228d/requirements.txt (line 1))
remote:          Downloading bottle-0.12.13.tar.gz (70kB)
remote:        Collecting requests (from -r /tmp/build_e78d8cbc61bd247692c3369f3d1a228d/requirements.txt (line 2))
remote:          Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
remote:        Collecting numpy (from -r /tmp/build_e78d8cbc61bd247692c3369f3d1a228d/requirements.txt (line 3))
remote:          Downloading numpy-1.13.1-cp27-cp27mu-manylinux1_x86_64.whl (16.6MB)
remote:        Collecting os (from -r /tmp/build_e78d8cbc61bd247692c3369f3d1a228d/requirements.txt (line 4))
remote:          Downloading os-0.5.tar.gz
remote:            Complete output from command python setup.py egg_info:
remote:            Traceback (most recent call last):
remote:              File "<string>", line 1, in <module>
remote:            IOError: [Errno 2] No such file or directory: '/tmp/pip-build-SaS1XO/os/setup.py'
remote:            
remote:            ----------------------------------------
remote:        Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-SaS1XO/os/
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to SRnotes.
remote: 
To https://git.heroku.com/SRnotes.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/SRnotes.git'

Tags: piptofrompygitbuildtxtremote