Heroku Deployment Issues ([remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs)
Heroku Deployment Issues ([remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs)
我目前正在学习 Heroku 的“Getting Started With Python”教程。我将 运行 保留在相同的部署问题中,我将在下面粘贴:
$ git push heroku master
Counting objects: 312, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (276/276), done.
Writing objects: 100% (312/312), 84.34 KiB | 2.34 MiB/s, done.
Total 312 (delta 130), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.2
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting antiorm==1.2.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 1))
remote: Downloading antiorm-1.2.1.tar.gz (171kB)
remote: Collecting appengine==1.8.0.2 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 2))
remote: Downloading appengine-1.8.0.2.tar.gz
remote: Collecting astroid==1.4.9 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 3))
remote: Downloading astroid-1.4.9-py2.py3-none-any.whl (213kB)
remote: Collecting autopep8==1.3.2 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 4))
remote: Downloading autopep8-1.3.2-py2.py3-none-any.whl (42kB)
remote: Collecting Babel==2.4.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 5))
remote: Downloading Babel-2.4.0-py2.py3-none-any.whl (6.8MB)
remote: Collecting backports.functools-lru-cache==1.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 6))
remote: Downloading backports.functools_lru_cache-1.3-py2.py3-none-any.whl
remote: Collecting backports.shutil-get-terminal-size==1.0.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 7))
remote: Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
remote: Collecting bcrypt==3.1.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 8))
remote: Downloading bcrypt-3.1.3-cp36-cp36m-manylinux1_x86_64.whl (54kB)
remote: Collecting beautifulsoup4==4.5.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 9))
remote: Downloading beautifulsoup4-4.5.3-py3-none-any.whl (85kB)
remote: Collecting bleach==2.0.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 10))
remote: Downloading bleach-2.0.0-py2.py3-none-any.whl
remote: Collecting blinker==1.4 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 11))
remote: Downloading blinker-1.4.tar.gz (111kB)
remote: Collecting certifi==2017.7.27.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 12))
remote: Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
remote: Collecting cffi==1.9.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 13))
remote: Downloading cffi-1.9.1-cp36-cp36m-manylinux1_x86_64.whl (398kB)
remote: Collecting chardet==3.0.4 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 14))
remote: Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
remote: Collecting click==6.7 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 15))
remote: Downloading click-6.7-py2.py3-none-any.whl (71kB)
remote: Collecting colorama==0.3.7 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 16))
remote: Downloading colorama-0.3.7-py2.py3-none-any.whl
remote: Collecting configparser==3.5.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 17))
remote: Downloading configparser-3.5.0.tar.gz
remote: Collecting coverage==4.4.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 18))
remote: Downloading coverage-4.4.1-cp36-cp36m-manylinux1_x86_64.whl (196kB)
remote: Collecting db==0.1.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 19))
remote: Downloading db-0.1.1.tar.gz
remote: Collecting decorator==4.0.11 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 20))
remote: Downloading decorator-4.0.11-py2.py3-none-any.whl
remote: Collecting distribute (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 21))
remote: Downloading distribute-0.7.3.zip (145kB)
remote: Complete output from command python setup.py egg_info:
remote: Traceback (most recent call last):
remote: File "<string>", line 1, in <module>
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/__init__.py", line 2, in <module>
remote: from setuptools.extension import Extension, Library
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/extension.py", line 5, in <module>
remote: from setuptools.dist import _get_unpatched
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/dist.py", line 7, in <module>
remote: from setuptools.command.install import install
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/command/__init__.py", line 8, in <module>
remote: from setuptools.command import install_scripts
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/command/install_scripts.py", line 3, in <module>
remote: from pkg_resources import Distribution, PathMetadata, ensure_directory
remote: File "/tmp/pip-build-zc0gylhz/distribute/pkg_resources.py", line 1518, in <module>
remote: register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
remote: AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
remote:
remote: ----------------------------------------
remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zc0gylhz/distribute/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
我已经在 pip 中更新了我的设置工具,并遵循了我在此处看到的其他几篇文章的建议。我找不到我的确切问题,所以我想把它放在那里。
感谢您提供的任何帮助!
以 "remote:" 开头的行由远程存储库中的 pre-receive
挂钩回显。远程存储库在接受您的推送之前运行挂钩来检查文件。它尝试 build/parse 文件并遇到错误 AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
。在下一次推送之前,您必须修复 pkg_resources.py, line 1518
处的错误。修复后,您可以修改最后一次提交。如果钩子检查每个提交,您需要确保文件在检查任何提交后不应该有 build/parse 错误。
我目前正在学习 Heroku 的“Getting Started With Python”教程。我将 运行 保留在相同的部署问题中,我将在下面粘贴:
$ git push heroku master
Counting objects: 312, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (276/276), done.
Writing objects: 100% (312/312), 84.34 KiB | 2.34 MiB/s, done.
Total 312 (delta 130), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.2
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting antiorm==1.2.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 1))
remote: Downloading antiorm-1.2.1.tar.gz (171kB)
remote: Collecting appengine==1.8.0.2 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 2))
remote: Downloading appengine-1.8.0.2.tar.gz
remote: Collecting astroid==1.4.9 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 3))
remote: Downloading astroid-1.4.9-py2.py3-none-any.whl (213kB)
remote: Collecting autopep8==1.3.2 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 4))
remote: Downloading autopep8-1.3.2-py2.py3-none-any.whl (42kB)
remote: Collecting Babel==2.4.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 5))
remote: Downloading Babel-2.4.0-py2.py3-none-any.whl (6.8MB)
remote: Collecting backports.functools-lru-cache==1.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 6))
remote: Downloading backports.functools_lru_cache-1.3-py2.py3-none-any.whl
remote: Collecting backports.shutil-get-terminal-size==1.0.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 7))
remote: Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
remote: Collecting bcrypt==3.1.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 8))
remote: Downloading bcrypt-3.1.3-cp36-cp36m-manylinux1_x86_64.whl (54kB)
remote: Collecting beautifulsoup4==4.5.3 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 9))
remote: Downloading beautifulsoup4-4.5.3-py3-none-any.whl (85kB)
remote: Collecting bleach==2.0.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 10))
remote: Downloading bleach-2.0.0-py2.py3-none-any.whl
remote: Collecting blinker==1.4 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 11))
remote: Downloading blinker-1.4.tar.gz (111kB)
remote: Collecting certifi==2017.7.27.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 12))
remote: Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
remote: Collecting cffi==1.9.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 13))
remote: Downloading cffi-1.9.1-cp36-cp36m-manylinux1_x86_64.whl (398kB)
remote: Collecting chardet==3.0.4 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 14))
remote: Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
remote: Collecting click==6.7 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 15))
remote: Downloading click-6.7-py2.py3-none-any.whl (71kB)
remote: Collecting colorama==0.3.7 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 16))
remote: Downloading colorama-0.3.7-py2.py3-none-any.whl
remote: Collecting configparser==3.5.0 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 17))
remote: Downloading configparser-3.5.0.tar.gz
remote: Collecting coverage==4.4.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 18))
remote: Downloading coverage-4.4.1-cp36-cp36m-manylinux1_x86_64.whl (196kB)
remote: Collecting db==0.1.1 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 19))
remote: Downloading db-0.1.1.tar.gz
remote: Collecting decorator==4.0.11 (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 20))
remote: Downloading decorator-4.0.11-py2.py3-none-any.whl
remote: Collecting distribute (from -r /tmp/build_667882a487f7eae4c46277a382f6b6f1/requirements.txt (line 21))
remote: Downloading distribute-0.7.3.zip (145kB)
remote: Complete output from command python setup.py egg_info:
remote: Traceback (most recent call last):
remote: File "<string>", line 1, in <module>
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/__init__.py", line 2, in <module>
remote: from setuptools.extension import Extension, Library
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/extension.py", line 5, in <module>
remote: from setuptools.dist import _get_unpatched
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/dist.py", line 7, in <module>
remote: from setuptools.command.install import install
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/command/__init__.py", line 8, in <module>
remote: from setuptools.command import install_scripts
remote: File "/tmp/pip-build-zc0gylhz/distribute/setuptools/command/install_scripts.py", line 3, in <module>
remote: from pkg_resources import Distribution, PathMetadata, ensure_directory
remote: File "/tmp/pip-build-zc0gylhz/distribute/pkg_resources.py", line 1518, in <module>
remote: register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
remote: AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
remote:
remote: ----------------------------------------
remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zc0gylhz/distribute/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
我已经在 pip 中更新了我的设置工具,并遵循了我在此处看到的其他几篇文章的建议。我找不到我的确切问题,所以我想把它放在那里。
感谢您提供的任何帮助!
以 "remote:" 开头的行由远程存储库中的 pre-receive
挂钩回显。远程存储库在接受您的推送之前运行挂钩来检查文件。它尝试 build/parse 文件并遇到错误 AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
。在下一次推送之前,您必须修复 pkg_resources.py, line 1518
处的错误。修复后,您可以修改最后一次提交。如果钩子检查每个提交,您需要确保文件在检查任何提交后不应该有 build/parse 错误。