gpt4 book ai didi

python - 在 osx 10.11 中安装 wxPython

转载 作者:太空狗 更新时间:2023-10-29 20:33:00 25 4
gpt4 key购买 nike

当我尝试安装 wxPython 时,它显示错误:

> The Installer could not install the software because there was no
> software found to install.

我该如何解决?

最佳答案

wxPython 正在使用 legacy script ,并根据这个 technical note 捆绑安装程序已被弃用并且(从 El Capitan 版本开始)不受支持:

Bundle-style installer packages are a legacy transition aid that is no longer supported. PackageMaker is also no longer supported. It is now necessary to convert to flat-file installer packages using tools like productbuild.

这给你留下了两个选择,

  1. 将安装程序转换为平面包。
  2. 编译wxWidgets并安装到本地。

要实现前者,请遵循以下说明:

0) 假设您已经安装了 dmg 并将 pkg 文件夹移动到工作位置.

cd ~/repack_wxpython
cp -r /Volumes/wxPython/wxPython-ABC.pkg .

1) 使用 pax 实用程序将负载文件 (pax.gz) 从 Contents/Resources 提取到一个文件夹,该文件夹将成为新包的根目录。

mkdir pkg_root
cd pkg_root
pax -f ../wxPython-ABC.pkg/Contents/Resources/wxPython-ABC.pax.gz -z -r
cd ..

2) 将包的preflight/postflight 脚本重命名为preinstall/postinstall 脚本,根据平面包的要求,在脚本文件夹中。

mkdir scripts
cp wxPython-ABC.pkg/Contents/Resources/preflight scripts/preinstall
cp wxPython-ABC.pkg/Contents/Resources/postflight scripts/postinstall

3) 使用pkgbuild 工具创建平面包:

pkgbuild --root ./pkg_root --scripts ./scripts --identifier com.wxwidgets.wxpython wxPython-ABC.pkg

这是 documentation of the pkbuild command如果您想自定义传递的参数。

注意事项:原始 bundle 包含一个 License.rtf 和一个 Welcome.txt 文件,它们不包含在平面包中。这些需要通过定义 custom XML 来添加文件并使用 the productbuild 创建另一个包命令。

关于python - 在 osx 10.11 中安装 wxPython,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34402303/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com