2017-06-01 45 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,构建成功。接下来我添加了需要六个的包,并且它工作。