创建安装 python 程序时缺少 et-xmlfile 的轮子

Missing wheel for et-xmlfile when creating install of python program

我刚刚添加了我的 python 应用程序使用 openpyxl 将数据集写入 excel 文件的功能。显然 openpyxl 依赖于 et-xml 文件。我首先通过 运行“setup.py sdist bdist_wheel”然后“pynsist installer.cfg”创建我的应用程序安装。我将 openpyxl==3.0.7 和 et-xmlfile=1.0.1 添加到 installer.cfg 文件的 [Include] 部分。

当 运行 pynsist 我得到以下错误。

文件“c:\users\vh942e\appdata\local\python\lib\site-packages\nsist\wheels.py”,第 150 行,在 get_from_pypi 提高 NoWheelError('No compatible wheels found for {0.name} {0.version}'.format(self)) nsist.wheels.NoWheelError: 未找到与 et-xmlfile 1.0.1

兼容的轮子

关于如何解决这个不兼容的车轮问题有什么想法吗?所有其他包含的库都有效。

et-xmlfile doesn't have wheels on PyPI 目前,Pynsist 仅使用其他人构建的轮子。这可能有一天会改变,但这将是一个显着的额外复杂性。

看起来是一个纯粹的Python项目,所以自己造一个轮子很容易:

pip wheel -w my_wheels et_xmlfile

那么你可以在include section of Pynsist's config file中指定:

 extra_wheel_sources=my_wheels/

或者,好像有人在几天前 (et-xmlfile-2021) 对 et-xmlfile 做了一个小分支并上传了一个轮子。您也许可以改用它。当然,如果您决定使用它,则由您来检查该分叉是否可信。