在osx 10.11中安装wxPython [英] Install wxPython in osx 10.11
问题描述
当我尝试安装wxPython时,它显示错误:
When I try to install wxPython, it shows an error:
> The Installer could not install the software because there was no
> software found to install.
我该如何解决?
推荐答案
wxPython使用的是旧脚本,并根据此
wxPython is using a legacy script, and according to this technical note bundle installers were deprecated and are (as of El Capitan release) unsupported:
捆绑式安装程序包是不再支持的旧版过渡帮助.也不再支持PackageMaker.现在必须使用productbuild之类的工具转换为平面文件安装程序包.
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.
这给您两个选择,
- 将安装程序转换为平面软件包.
- 编译wxWidgets并在本地安装.
要实现前者,请按照以下说明进行操作:
To achieve the former, follow these instructions:
0 )假设您已经安装了dmg
,并且已经将pkg
文件夹移动到了工作地点.
0) Let's assume that you have already mounted the dmg
and you have moved the pkg
folder to a working place.
cd ~/repack_wxpython
cp -r /Volumes/wxPython/wxPython-ABC.pkg .
1 ),使用pax实用程序将有效负载文件(pax.gz
)从Contents/Resources
提取到将成为新软件包根目录的文件夹中.
1) Use the pax utility to extract the payload file (pax.gz
) from Contents/Resources
to a folder that will become the root of your new package.
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
脚本.
2) Rename the bundle's preflight
/postflight
scripts, to preinstall
/postinstall
scripts, as required for flat packages, in a scripts folder.
mkdir scripts
cp wxPython-ABC.pkg/Contents/Resources/preflight scripts/preinstall
cp wxPython-ABC.pkg/Contents/Resources/postflight scripts/postinstall
3 )使用pkgbuild
工具创建扁平包装:
3) Create the flat package using the pkgbuild
tool:
pkgbuild --root ./pkg_root --scripts ./scripts --identifier com.wxwidgets.wxpython wxPython-ABC.pkg
这是pkbuild
命令的文档,以防您要自定义传递的参数.
This is the documentation of the pkbuild
command in case you want to customize the passed parameters.
注意事项:原始捆绑包中包含License.rtf
和Welcome.txt
文件,这些文件不包含在平面软件包中.这些需要通过定义 productbuild
命令.
Caveats: The original bundle package contains a License.rtf
and a Welcome.txt
files that are not included in the flat package. Those need to be added by defining a custom XML file and creating another package using the productbuild
command.
这篇关于在osx 10.11中安装wxPython的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!