Failed building wheel for backports.zoneinfo的处理方法

张志军 1年前 (2023-08-24) 1195次浏览 0个评论

银河麒麟系统下安装Django,出现Failed building wheel for backports.zoneinfo,具体错误描述如下所示。通过查询相关资料,发现是由于缺少了python的头文件和一些静态库导致的,通过安装python3-dev的包解决此问题。Building wheels......

银河麒麟系统下安装Django,出现Failed building wheel for backports.zoneinfo,具体错误描述如下所示。通过查询相关资料,发现是由于缺少了python的头文件和一些静态库导致的,通过安装python3-dev的包解决此问题。

Building wheels for collected packages: backports.zoneinfo
  Building wheel for backports.zoneinfo (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /data/workspace/python/djangocms/venv/bin/python3 /tmp/tmpjg47v9qz build_wheel /tmp/tmpc5vodtl5
       cwd: /tmp/pip-install-uxxyidob/backports.zoneinfo
  Complete output (53 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-aarch64-cpython-38
  creating build/lib.linux-aarch64-cpython-38/backports
  copying src/backports/__init__.py -> build/lib.linux-aarch64-cpython-38/backports
  creating build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  copying src/backports/zoneinfo/_common.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  copying src/backports/zoneinfo/_version.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  copying src/backports/zoneinfo/__init__.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  running egg_info
  writing src/backports.zoneinfo.egg-info/PKG-INFO
  writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
  writing requirements to src/backports.zoneinfo.egg-info/requires.txt
  writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
  reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  /tmp/pip-build-env-ts_7ipob/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
  !!
  
          ********************************************************************************
          The license_file parameter is deprecated, use license_files instead.
  
          By 2023-Oct-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    parsed = self.parsers.get(option_name, lambda x: x)(value)
  warning: no files found matching '*.png' under directory 'docs'
  warning: no files found matching '*.svg' under directory 'docs'
  no previously-included directories found matching 'docs/_build'
  no previously-included directories found matching 'docs/_output'
  adding license file 'LICENSE'
  adding license file 'licenses/LICENSE_APACHE'
  writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
  copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  copying src/backports/zoneinfo/py.typed -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
  running build_ext
  building 'backports.zoneinfo._czoneinfo' extension
  creating build/temp.linux-aarch64-cpython-38
  creating build/temp.linux-aarch64-cpython-38/lib
  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/data/workspace/python/djangocms/venv/include -I/usr/include/python3.8 -c lib/zoneinfo_module.c -o build/temp.linux-aarch64-cpython-38/lib/zoneinfo_module.o -std=c99
  lib/zoneinfo_module.c:1:10: fatal error: Python.h: 没有那个文件或目录
      1 | #include "Python.h"
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for backports.zoneinfo
Failed to build backports.zoneinfo
ERROR: Could not build wheels for backports.zoneinfo which use PEP 517 and cannot be installed directly

解决方法:

sudo apt install python3-dev
0 0 投票数
文章评分

版权申明:

本博客所有文章除特别声明外均采用BY-NC-SA 4.0许可协议。依据BY-NC-SA 4.0许可协议,转载请附上原文出处链接及本声明。

原文链接:https://ilearning.org.cn/program/web/failed-building-wheel-for-backports-zoneinfo-de-chuli-fangfa.html

客官,说点什么吧!

订阅评论
提醒
guest

0 评论
内联反馈
查看所有评论
关于本站
立学网是一个分享个人学习总结的知识网站,内容覆盖编程技术讨论,金融经济,历史哲学,读书笔记,生活随笔等内容。
关注我们
关注微信公众号 关注微博