我已经尝试了很长时间来安装 Flask。
每次我遇到相同的错误时,我都会收到以下关于没有先前包含的文件的警告。我不确定如何绕过它,因为它似乎会干扰我需要或想要做的任何事情。
我成功地遵循了一个基本的heroku教程,直到我不得不推送git,它失败了。非常感谢任何帮助。
(venv)Shahs-MacBook-Pro:helloflask ssaullah$ pip install Flask gunicorn
Downloading/unpacking Flask
Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded
Running setup.py egg_info for package Flask
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking gunicorn
Downloading gunicorn-0.17.4.tar.gz (372kB): 372kB downloaded
Running setup.py egg_info for package gunicorn
Downloading/unpacking Werkzeug>=0.7 (from Flask)
Downloading Werkzeug-0.9.1.tar.gz (1.1MB): 1.1MB downloaded
Running setup.py egg_info for package Werkzeug
warning: no files found matching '*' under directory 'werkzeug/debug/templates'
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs/_build'
Downloading/unpacking Jinja2>=2.4 (from Flask)
Downloading Jinja2-2.7.tar.gz (377kB): 377kB downloaded
Running setup.py egg_info for package Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
Downloading/unpacking itsdangerous>=0.21 (from Flask)
Downloading itsdangerous-0.21.tar.gz
Running setup.py egg_info for package itsdangerous
Downloading/unpacking markupsafe (from Jinja2>=2.4->Flask)
Downloading MarkupSafe-0.18.tar.gz
Running setup.py egg_info for package markupsafe
Installing collected packages: Flask, gunicorn, Werkzeug, Jinja2, itsdangerous, markupsafe
Running setup.py install for Flask
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Running setup.py install for gunicorn
Installing gunicorn_paster script to /Users/ssaullah/Desktop/tryweb/helloflask/venv/bin
Installing gunicorn script to /Users/ssaullah/Desktop/tryweb/helloflask/venv/bin
Installing gunicorn_django script to /Users/ssaullah/Desktop/tryweb/helloflask/venv/bin
Running setup.py install for Werkzeug
warning: no files found matching '*' under directory 'werkzeug/debug/templates'
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs/_build'
Running setup.py install for Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
Running setup.py install for itsdangerous
Running setup.py install for markupsafe
building 'markupsafe._speedups' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c markupsafe/_speedups.c -o build/temp.macosx-10.3-fat-2.7/markupsafe/_speedups.o
/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -g build/temp.macosx-10.3-fat-2.7/markupsafe/_speedups.o -o build/lib.macosx-10.3-fat-2.7/markupsafe/_speedups.so
Successfully installed Flask gunicorn Werkzeug Jinja2 itsdangerous markupsafe
Cleaning up...
编辑:
我应该包括这个:当我在教程结束时尝试推送 git 时出现的错误。
Shahs-MacBook-Pro:helloflask ssaullah$ git push heroku master
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 731 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.4.
-----> Preparing Python runtime (python-2.7.4)
-----> Installing Distribute (0.6.36)
-----> Installing Pip (1.3.1)
-----> Installing dependencies using Pip (1.3.1)
Downloading/unpacking Django==1.5.1 (from -r requirements.txt (line 1))
Running setup.py egg_info for package Django
Downloading/unpacking Flask==0.9 (from -r requirements.txt (line 2))
Running setup.py egg_info for 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.6 (from -r requirements.txt (line 3))
Running setup.py egg_info for package Jinja2
Downloading/unpacking Polygon==2.0.1 (from -r requirements.txt (line 4))
Could not find a version that satisfies the requirement Polygon==2.0.1 (from -r requirements.txt (line 4)) (from versions: 3.0.5, 3.0.4a-src, 2.0.5, 2.0.4.macosx-10.6-universal, 2.0.4)
No distributions matching the version for Polygon==2.0.1 (from -r requirements.txt (line 4))
Storing complete log in /app/.pip/pip.log
! Push rejected, failed to compile Python app
To git@heroku.com:immense-waters-4799.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:immense-waters-4799.git'