PIP软件包错误:错误后端子过程试图调用get_requires_for_build_sdist

发布于 2025-02-03 08:26:25 字数 1628 浏览 2 评论 0原文

因此,我正在尝试制作PIP包,以便可以发布它。但是,按照步骤在这里,我在上,我在py -m构建命令。

错误读取:

unicodedecodeerror:'utf-8'编解码器无法在位置0:无效启动字节

错误后端subprocess在尝试调用get_requires_for_for_for_for_build_sdist

my folder byte 0xff。结构与站点上的示例中给出的结构相同。

packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│   └── example_package/
│       ├── __init__.py
│       └── example.py
│       └── some_file.py
│       └── chromedriver.exe
│       └── requirements.txt
│       └── some_file2.py
│       └── some_file3.py
└── tests/

这是我的setup.cfg

[metadata]
name = package-name
version = 0.0.1
author = name
author_email = email
description = words
long_description = file: README.md
long_description_content_type = text/markdown
url = link
project_urls =
    Bug Tracker = issuses link
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
python_requires = >=3.6

[options.packages.find]
where = src

,这是我的pyproject.toml

[build-system]
requires = [
    "setuptools>=42",
    "wheel"
]
build-backend = "setuptools.build_meta"

我不确定在这里该做什么,我读到这是一个编码问题并打开了一些文件例如codecs.py,它是引用并更改为所有bopen。但仍然没有。任何帮助将不胜感激!

so I'm trying to make a pip package so that I can publish it. However, when following the steps here, I get an error on the py -m build command.

The Error reads:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist

My folder structure is the same as given in the example on the site.

packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│   └── example_package/
│       ├── __init__.py
│       └── example.py
│       └── some_file.py
│       └── chromedriver.exe
│       └── requirements.txt
│       └── some_file2.py
│       └── some_file3.py
└── tests/

Here is my setup.cfg

[metadata]
name = package-name
version = 0.0.1
author = name
author_email = email
description = words
long_description = file: README.md
long_description_content_type = text/markdown
url = link
project_urls =
    Bug Tracker = issuses link
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
python_requires = >=3.6

[options.packages.find]
where = src

and here is my pyproject.toml

[build-system]
requires = [
    "setuptools>=42",
    "wheel"
]
build-backend = "setuptools.build_meta"

I am unsure of what to do here, I read that it's an encoding issues and opened up some of the files such as codecs.py which is references and changed added a b to all the open . But still nothing. Any help would be appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文