首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >backports.zoneinfo推送无法生成backports.zoneinfo错误的车轮

backports.zoneinfo推送无法生成backports.zoneinfo错误的车轮
EN

Stack Overflow用户
提问于 2022-03-30 15:11:44
回答 1查看 2.1K关注 0票数 0

我正试图将django项目推向heroku。heroku创建工作良好,但当试图推送到heroku main时,我得到以下错误。

“”“

代码语言:javascript
复制
Enumerating objects: 5317, done.
Counting objects: 100% (5317/5317), done.
Delta compression using up to 2 threads
Compressing objects: 100% (1852/1852), done.
Writing objects: 100% (5317/5317), 72.93 MiB | 134.00 KiB/s, done.
Total 5317 (delta 4004), reused 4506 (delta 3415)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> No Python version was specified. Using the buildpack default: python-3.10.4
remote:        To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.10.4
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting asgiref==3.4.1
remote:          Downloading asgiref-3.4.1-py3-none-any.whl (25 kB)
remote:        Collecting backports.zoneinfo==0.2.1
remote:          Downloading backports.zoneinfo-0.2.1.tar.gz (74 kB)
remote:          Installing build dependencies: started
remote:          Installing build dependencies: finished with status 'done'
remote:          Getting requirements to build wheel: started
remote:          Getting requirements to build wheel: finished with status 'done'
remote:          Preparing metadata (pyproject.toml): started
remote:          Preparing metadata (pyproject.toml): finished with status 'done'
remote:        Collecting boto3==1.21.21
remote:          Downloading boto3-1.21.21-py3-none-any.whl (132 kB)
remote:        Collecting botocore==1.24.21
remote:          Downloading botocore-1.24.21-py3-none-any.whl (8.6 MB)
remote:        Collecting certifi==2021.10.8
remote:          Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
remote:        Collecting charset-normalizer==2.0.12
remote:          Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
remote:        Collecting click==8.0.4
remote:          Downloading click-8.0.4-py3-none-any.whl (97 kB)
remote:        Collecting cssselect==1.1.0
remote:          Downloading cssselect-1.1.0-py2.py3-none-any.whl (16 kB)
remote:        Collecting Django==3.2.5
remote:          Downloading Django-3.2.5-py3-none-any.whl (7.9 MB)
remote:        Collecting django-autocomplete-light==3.9.4
remote:          Downloading django-autocomplete-light-3.9.4.tar.gz (168 kB)
remote:          Preparing metadata (setup.py): started
remote:          Preparing metadata (setup.py): finished with status 'done'
remote:        Collecting django-bootstrap-pagination==1.7.1
remote:          Downloading django_bootstrap_pagination-1.7.1-py3-none-any.whl (15 kB)
remote:        Collecting django-storages==1.12.3
remote:          Downloading django_storages-1.12.3-py3-none-any.whl (44 kB)
remote:        Collecting django-widget-tweaks==1.4.8
remote:          Downloading django_widget_tweaks-1.4.8-py2.py3-none-any.whl (11 kB)
remote:        Collecting django-with-asserts==0.0.1
remote:          Downloading django-with-asserts-0.0.1.tar.gz (2.3 kB)
remote:          Preparing metadata (setup.py): started
remote:          Preparing metadata (setup.py): finished with status 'done'
remote:        Collecting Faker==8.10.3
remote:          Downloading Faker-8.10.3-py3-none-any.whl (1.2 MB)
remote:        Collecting fontawesome-free==5.15.4
remote:          Downloading fontawesome_free-5.15.4-py3-none-any.whl (20.9 MB)
remote:        Collecting greenlet==1.1.2
remote:          Downloading greenlet-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (155 kB)
remote:        Collecting idna==3.3
remote:          Downloading idna-3.3-py3-none-any.whl (61 kB)
remote:        Collecting jmespath==1.0.0
remote:          Downloading jmespath-1.0.0-py3-none-any.whl (23 kB)
remote:        Collecting joblib==1.1.0
remote:          Downloading joblib-1.1.0-py2.py3-none-any.whl (306 kB)
remote:        Collecting lxml==4.7.1
remote:          Downloading lxml-4.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)
remote:        Collecting Pillow==9.0.1
remote:          Downloading Pillow-9.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
remote:        Collecting libgravatar==1.0.0
remote:          Downloading libgravatar-1.0.0-py2.py3-none-any.whl (17 kB)
remote:        Collecting nltk==3.7
remote:          Downloading nltk-3.7-py3-none-any.whl (1.5 MB)
remote:        Collecting numpy==1.22.2
remote:          Downloading numpy-1.22.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
remote:        Collecting pandas==1.4.1
remote:          Downloading pandas-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
remote:        Collecting PyJWT==2.3.0
remote:          Downloading PyJWT-2.3.0-py3-none-any.whl (16 kB)
remote:        Collecting python-dateutil==2.8.2
remote:          Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
remote:        Collecting python-decouple==3.6
remote:          Downloading python_decouple-3.6-py3-none-any.whl (9.9 kB)
remote:        Collecting pytz==2021.1
remote:          Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
remote:        Collecting requests==2.27.1
remote:          Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
remote:        Collecting s3transfer==0.5.2
remote:          Downloading s3transfer-0.5.2-py3-none-any.whl (79 kB)
remote:        Collecting regex==2022.3.15
remote:          Downloading regex-2022.3.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (763 kB)
remote:        Collecting scikit-learn==1.0.2
remote:          Downloading scikit_learn-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26.5 MB)
remote:        Collecting scikit-surprise==1.1.1
remote:          Downloading scikit-surprise-1.1.1.tar.gz (11.8 MB)
remote:          Preparing metadata (setup.py): started
remote:          Preparing metadata (setup.py): finished with status 'done'
remote:        Collecting scipy==1.8.0
remote:          Downloading scipy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (42.3 MB)
remote:        Collecting six==1.16.0
remote:          Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
remote:        Collecting sklearn==0.0
remote:          Downloading sklearn-0.0.tar.gz (1.1 kB)
remote:          Preparing metadata (setup.py): started
remote:          Preparing metadata (setup.py): finished with status 'done'
remote:        Collecting SQLAlchemy==1.4.31
remote:          Downloading SQLAlchemy-1.4.31-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)
remote:        Collecting sqlparse==0.4.2
remote:          Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB)
remote:        Collecting surprise==0.1
remote:          Downloading surprise-0.1-py2.py3-none-any.whl (1.8 kB)
remote:        Collecting tabulate==0.8.9
remote:          Downloading tabulate-0.8.9-py3-none-any.whl (25 kB)
remote:        Collecting text-unidecode==1.3
remote:          Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
remote:        Collecting threadpoolctl==3.1.0
remote:          Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
remote:        Collecting tqdm==4.63.1
remote:          Downloading tqdm-4.63.1-py2.py3-none-any.whl (76 kB)
remote:        Collecting urllib3==1.26.8
remote:          Downloading urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
remote:        Collecting coverage==6.1.1
remote:          Downloading coverage-6.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (215 kB)
remote:        Collecting gunicorn==20.1.0
remote:          Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
remote:        Collecting django-on-heroku==1.1.2
remote:          Downloading django_on_heroku-1.1.2-py2.py3-none-any.whl (6.1 kB)
remote:        Collecting whitenoise
remote:          Downloading whitenoise-6.0.0-py3-none-any.whl (19 kB)
remote:        Collecting psycopg2-binary
remote:          Downloading psycopg2_binary-2.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
remote:        Collecting dj-database-url>=0.5.0
remote:          Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
remote:        Building wheels for collected packages: backports.zoneinfo, django-autocomplete-light, django-with-asserts, scikit-surprise, sklearn
remote:          Building wheel for backports.zoneinfo (pyproject.toml): started
remote:          Building wheel for backports.zoneinfo (pyproject.toml): finished with status 'error'
remote:          ERROR: Command errored out with exit status 1:
remote:           command: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp_65_48i9
remote:               cwd: /tmp/pip-install-pr_oku67/backports-zoneinfo_358c04e6bf0b4df0a6fdb4b542614e4a
remote:          Complete output (41 lines):
remote:          running bdist_wheel
remote:          running build
remote:          running build_py
remote:          creating build
remote:          creating build/lib.linux-x86_64-3.10
remote:          creating build/lib.linux-x86_64-3.10/backports
remote:          copying src/backports/__init__.py -> build/lib.linux-x86_64-3.10/backports
remote:          creating build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          copying src/backports/zoneinfo/_version.py -> build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          copying src/backports/zoneinfo/_common.py -> build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          copying src/backports/zoneinfo/__init__.py -> build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          running egg_info
remote:          writing src/backports.zoneinfo.egg-info/PKG-INFO
remote:          writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
remote:          writing requirements to src/backports.zoneinfo.egg-info/requires.txt
remote:          writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
remote:          reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
remote:          reading manifest template 'MANIFEST.in'
remote:          warning: no files found matching '*.png' under directory 'docs'
remote:          warning: no files found matching '*.svg' under directory 'docs'
remote:          no previously-included directories found matching 'docs/_build'
remote:          no previously-included directories found matching 'docs/_output'
remote:          adding license file 'LICENSE'
remote:          adding license file 'licenses/LICENSE_APACHE'
remote:          writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
remote:          copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          copying src/backports/zoneinfo/py.typed -> build/lib.linux-x86_64-3.10/backports/zoneinfo
remote:          running build_ext
remote:          building 'backports.zoneinfo._czoneinfo' extension
remote:          creating build/temp.linux-x86_64-3.10
remote:          creating build/temp.linux-x86_64-3.10/lib
remote:          gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/app/.heroku/python/include/python3.10 -c lib/zoneinfo_module.c -o build/temp.linux-x86_64-3.10/lib/zoneinfo_module.o -std=c99
remote:          lib/zoneinfo_module.c: In function ‘zoneinfo_fromutc’:
remote:          lib/zoneinfo_module.c:600:19: error: ‘_PyLong_One’ undeclared (first use in this function); did you mean ‘_PyLong_New’?
remote:            600 |             one = _PyLong_One;
remote:                |                   ^~~~~~~~~~~
remote:                |                   _PyLong_New
remote:          lib/zoneinfo_module.c:600:19: note: each undeclared identifier is reported only once for each function it appears in
remote:          error: command '/usr/bin/gcc' failed with exit code 1
remote:          ----------------------------------------
remote:          ERROR: Failed building wheel for backports.zoneinfo
remote:          Building wheel for django-autocomplete-light (setup.py): started
remote:          Building wheel for django-autocomplete-light (setup.py): finished with status 'done'
remote:          Created wheel for django-autocomplete-light: filename=django_autocomplete_light-3.9.4-py3-none-any.whl size=215911 sha256=30114df9dd68e354bfdb4d2f96e2021da6eb20671b65157403d780f499c26c8a
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-r5m6o54r/wheels/ce/e8/3f/7e330eb9408b643697eb7512f5c489f6fcdf1aa0784b80bbcc
remote:          Building wheel for django-with-asserts (setup.py): started
remote:          Building wheel for django-with-asserts (setup.py): finished with status 'done'
remote:          Created wheel for django-with-asserts: filename=django_with_asserts-0.0.1-py3-none-any.whl size=3412 sha256=578ae1491b724d413c91c83a05c2e97994ba1ccf881a69e1b84b9d0aa297c8c4
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-r5m6o54r/wheels/7f/9b/7a/aad762caa70f6f9d09961c836bd7079372dd6624076b3aefec
remote:          Building wheel for scikit-surprise (setup.py): started
remote:          Building wheel for scikit-surprise (setup.py): finished with status 'done'
remote:          Created wheel for scikit-surprise: filename=scikit_surprise-1.1.1-cp310-cp310-linux_x86_64.whl size=2199346 sha256=ade1dd4c58dd83220e3f2f115582740c38ae1df7d75e9de17969eb73a978c3d7
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-r5m6o54r/wheels/83/11/fb/6f834df4a72a79fcd80a6ab5e3098cee14dc66bda025915ace
remote:          Building wheel for sklearn (setup.py): started
remote:          Building wheel for sklearn (setup.py): finished with status 'done'
remote:          Created wheel for sklearn: filename=sklearn-0.0-py2.py3-none-any.whl size=1309 sha256=5740fee80a0dfdf6c3e1b6f1fab7be2045f155cb4ff372a28671bdb3a6c71c99
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-r5m6o54r/wheels/9b/13/01/6f3a7fd641f90e1f6c8c7cded057f3394f451f340371c68f3d
remote:        Successfully built django-autocomplete-light django-with-asserts scikit-surprise sklearn
remote:        Failed to build backports.zoneinfo
remote:        ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: 19762dea9056f91bd1708c11f3c2b120b79f085c
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 19762dea9056f91bd1708c11f3c2b120b79f085c
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to [blocked].
remote: 
To https://git.heroku.com/[blocked].git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/[blocked].git'

“”“

我试着寻找heroku特有的错误,但没有找到任何解决方案。我也尝试过在我的机器上安装backport.zoneinfo,但是它说已经满足了需求。

我是新来的heroku,所以任何帮助都将不胜感激。谢谢。

EN

回答 1

Stack Overflow用户

发布于 2022-04-01 06:45:16

这可能是由于您的本地python版本与heroku的python运行时版本之间的不匹配,目前使用的版本是python3.10.4。

若要指定用于heroku的哪个python运行时,请在应用程序的根目录中创建runtime.txt,并指定确切的python版本。所以如果你做了cat runtime.txt,它可以是这样的

代码语言:javascript
复制
python-3.7.13

有关详细信息,请参阅本网页

到目前为止,支持的python版本包括

  • python-3.10.3,
  • python-3.9.11,
  • python-3.8.13
  • python-3.7.13
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71679806

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档