2017-06-01 50 views
0
Counting objects: 1260, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (1208/1208), done. 
Writing objects: 100% (1260/1260), 6.24 MiB | 184.00 KiB/s, done. 
Total 1260 (delta 109), 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 appdirs==1.4.3 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 1)) 
remote:   Downloading appdirs-1.4.3-py2.py3-none-any.whl 
remote:  Collecting click==6.7 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 2)) 
remote:   Downloading click-6.7-py2.py3-none-any.whl (71kB) 
remote:  Collecting Flask==0.12.2 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 3)) 
remote:   Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB) 
remote:  Collecting gunicorn==19.7.1 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 4)) 
remote:   Downloading gunicorn-19.7.1-py2.py3-none-any.whl (111kB) 
remote:  Collecting itsdangerous==0.24 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 5)) 
remote:   Downloading itsdangerous-0.24.tar.gz (46kB) 
remote:  Collecting Jinja2==2.9.6 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 6)) 
remote:   Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB) 
remote:  Collecting MarkupSafe==1.0 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 7)) 
remote:   Downloading MarkupSafe-1.0.tar.gz 
remote:  Collecting packaging==16.8 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 8)) 
remote:   Downloading packaging-16.8-py2.py3-none-any.whl 
remote:  Collecting pyparsing==2.2.0 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 9)) 
remote:   Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB) 
remote:  Collecting six==1.10.0 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 10)) 
remote:   Downloading six-1.10.0-py2.py3-none-any.whl 
remote:  Collecting Werkzeug==0.12.2 (from -r /tmp/build_05ed4039dfcb7243b9f260b604feea9c/requirements.txt (line 11)) 
remote:   Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB) 
remote:  Installing collected packages: appdirs, click, itsdangerous, Werkzeug, MarkupSafe, Jinja2, Flask, gunicorn, pyparsing, six, packaging 
remote:   Running setup.py install for itsdangerous: started 
remote:   Running setup.py install for itsdangerous: finished with status 'error' 
remote:   Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-H6YgNg/itsdangerous/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-VAC6vv-record/install-record.txt --single-version-externally-managed --compile: 
remote:   running install 
remote:   running build 
remote:   running build_py 
remote:   creating build 
remote:   creating build/lib 
remote:   copying itsdangerous.py -> build/lib 
remote:   running install_lib 
remote:   copying build/lib/itsdangerous.py -> /app/.heroku/python/lib/python2.7/site-packages 
remote:   byte-compiling /app/.heroku/python/lib/python2.7/site-packages/itsdangerous.py to itsdangerous.pyc 
remote:   running install_egg_info 
remote:   running egg_info 
remote:   writing itsdangerous.egg-info/PKG-INFO 
remote:   writing top-level names to itsdangerous.egg-info/top_level.txt 
remote:   writing dependency_links to itsdangerous.egg-info/dependency_links.txt 
remote:   reading manifest file 'itsdangerous.egg-info/SOURCES.txt' 
remote:   reading manifest template 'MANIFEST.in' 
remote:   writing manifest file 'itsdangerous.egg-info/SOURCES.txt' 
remote:   Copying itsdangerous.egg-info to /app/.heroku/python/lib/python2.7/site-packages/itsdangerous-0.24-py2.7.egg-info 
remote:   running install_scripts 
remote:   Traceback (most recent call last): 
remote:    File "<string>", line 1, in <module> 
remote:    File "/tmp/pip-build-H6YgNg/itsdangerous/setup.py", line 20, in <module> 
remote:    'Programming Language :: Python :: 3', 
remote:    File "/app/.heroku/python/lib/python2.7/distutils/core.py", line 151, in setup 
remote:    dist.run_commands() 
remote:    File "/app/.heroku/python/lib/python2.7/distutils/dist.py", line 953, in run_commands 
remote:    self.run_command(cmd) 
remote:    File "/app/.heroku/python/lib/python2.7/distutils/dist.py", line 972, in run_command 
remote:    cmd_obj.run() 
remote:    File "/app/.heroku/python/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run 
remote:    return orig.install.run(self) 
remote:    File "/app/.heroku/python/lib/python2.7/distutils/command/install.py", line 575, in run 
remote:    self.run_command(cmd_name) 
remote:    File "/app/.heroku/python/lib/python2.7/distutils/cmd.py", line 326, in run_command 
remote:    self.distribution.run_command(command) 
remote:    File "/app/.heroku/python/lib/python2.7/distutils/dist.py", line 972, in run_command 
remote:    cmd_obj.run() 
remote:    File "/app/.heroku/python/lib/python2.7/site-packages/setuptools/command/install_scripts.py", line 17, in run 
remote:    import setuptools.command.easy_install as ei 
remote:    File "/app/.heroku/python/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 49, in <module> 
remote:    from setuptools.py27compat import rmtree_safe 
remote:    File "/app/.heroku/python/lib/python2.7/site-packages/setuptools/py27compat.py", line 7, in <module> 
remote:    import six 
remote:   ImportError: No module named six 
remote:    
remote:   ---------------------------------------- 
remote:  Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-H6YgNg/itsdangerous/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-VAC6vv-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-H6YgNg/itsdangerous/ 
remote: !  Push rejected, failed to compile Python app. 
remote: 
remote: !  Push failed 
remote: Verifying deploy... 
remote: 
remote: ! Push rejected to searchword. 
remote: 
To https://git.heroku.com/searchword.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/searchword.git' 

我不知道發生了什麼。幾天前,我能夠在heroku上部署應用程序,卻沒有出現這種錯誤。我在虛擬環境中運行。在推送給heroku master之前,我激活了它。我甚至檢查了我指的是哪一點,但都是徒勞的。我甚至在本地機器和虛擬環境中安裝了模塊'6'。仍然總是說沒有模塊命名爲6,並且我的部署失敗。請幫忙!!令人沮喪!Heroku構建失敗總是 - 說沒有模塊命名六

回答

1

因爲這是谷歌翻譯,我很抱歉,如果它變得有趣。 我上癮的情況完全一樣。 我不知道爲什麼它進行得很順利,但是我在「requirements.txt」的開頭替換它來描述 「six == 1.10.0」並部署它。順便說一句,我的python版本是3.6···

+0

是的。解決方案之前安裝六個。原因是@AshishRanjan評論 –

0

這是目前最新版本的setuptools(36.0.0)的一個問題。您可以在這裏跟蹤問題 - https://github.com/pypa/setuptools/issues/1042

+0

我安裝了第一個,但沒有發生。順便問題現在解決了。我用pip更新了我的setuptools,然後heroku顯示沒有錯誤。 –

+0

軟件包出現在'requirements.txt'文件中的順序並不能確保軟件包實際上被'pip'以相同的順序安裝。請參閱 - https://github.com/pypa/pip/issues/3480 –

0

我通過從reqirements.txt中刪除需要六個模塊來解決此問題。然後推向heroku,構建成功。接下來我添加了需要六個的包,並且它工作。