#python #heroku #web #flask
#python #heroku #веб #flask
Вопрос:
Я очень новичок в этом, и мое приложение Flask не работает. Я читал решения, в которых requirements.txt файл редактируется, чтобы избавиться от distribute и setuptools, но у меня нет ни того, ни другого в моем requirements.txt:
Flask==0.10.1
Jinja2==2.7.3
MarkupSafe==0.23
Werkzeug==0.9.6
gunicorn==19.0.0
itsdangerous==0.24
numpy==1.8.1
pygame==1.9.1
virtualenv==1.11.6
Вот вывод ошибки:
$ git push heroku master
Initializing repository, done.
Counting objects: 36, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (34/34), done.
Writing objects: 100% (36/36), 4.73 KiB, done.
Total 36 (delta 16), reused 0 (delta 0)
-----> Python app detected
-----> Preparing Python runtime (python-2.7.7)
-----> Installing Setuptools (3.6)
-----> Installing Pip (1.5.6)
-----> Installing dependencies using Pip (1.5.6)
Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 1))
Running setup.py (path:/tmp/pip_build_u10377/Flask/setup.py) egg_info f
or package Flask
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Jinja2==2.7.3 (from -r requirements.txt (line 2))
Running setup.py (path:/tmp/pip_build_u10377/Jinja2/setup.py) egg_info
for package Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
Downloading/unpacking MarkupSafe==0.23 (from -r requirements.txt (line 3)
)
Downloading MarkupSafe-0.23.tar.gz
Running setup.py (path:/tmp/pip_build_u10377/MarkupSafe/setup.py) egg_i
nfo for package MarkupSafe
Downloading/unpacking Werkzeug==0.9.6 (from -r requirements.txt (line 4))
Running setup.py (path:/tmp/pip_build_u10377/Werkzeug/setup.py) egg_inf
o for package Werkzeug
warning: no files found matching '*' under directory 'werkzeug/debug/
templates'
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching 'docs/_build'
Downloading/unpacking gunicorn==19.0.0 (from -r requirements.txt (line 5)
)
Running setup.py (path:/tmp/pip_build_u10377/gunicorn/setup.py) egg_inf
o for package gunicorn
Downloading/unpacking itsdangerous==0.24 (from -r requirements.txt (line
6))
Running setup.py (path:/tmp/pip_build_u10377/itsdangerous/setup.py) egg
_info for package itsdangerous
Downloading/unpacking numpy==1.8.1 (from -r requirements.txt (line 7))
Running setup.py (path:/tmp/pip_build_u10377/numpy/setup.py) egg_info f
or package numpy
Running from numpy source directory.
warning: no files found matching 'tools/py3tool.py'
warning: no files found matching '*' under directory 'doc/f2py'
Downloading/unpacking pygame==1.9.1 (from -r requirements.txt (line 8))
Could not find any downloads that satisfy the requirement pygame==1.9.1
(from -r requirements.txt (line 8))
Some insecure and unverifiable files were ignored (use --allow-unverifi
ed pygame to allow).
Cleaning up...
No distributions at all found for pygame==1.9.1 (from -r requirements.txt
(line 8))
Storing debug log for failure in /app/.pip/pip.log
! Push rejected, failed to compile Python app
To git@heroku.com:intj.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:intj.git'
$
Все советы приветствуются. Спасибо!
Комментарии:
1. Если вы не хотите setuptools и распространять, вы
pip uninstall setuptools
иpip uninstall distribute
?2. Какую точную ошибку вы получаете?
3. Нам понадобится вывод ошибки, чтобы иметь возможность помочь вам.
4. Извините, я должен был добавить это.
Ответ №1:
Сбой, потому что он не может установить pygame. Я думаю, вам это не нужно на сервере, вы можете удалить pygame == 1.9.1 из requirements.txt .