我是 Python 开发新手,在尝试安装 Aptana Studio 时,我似乎搞乱了我的 Python 安装。所以我按照这里的卸载 MacPython 说明进行操作http://homepages.cwi.nl/~jack/macpython/uninstall.html http://homepages.cwi.nl/~jack/macpython/uninstall.html
...现在我正在尝试再次安装Python。
据我所知,GAE 需要 Python 2.5。所以我尝试从这里安装 2.5.4 版本:http://www.python.org/download/releases/2.5.4/ http://www.python.org/download/releases/2.5.4/我已经下载了 dmg,安装时出现以下错误:
The installation failed.
The following installation step failed: run postflight script for Fix system Python. Contact the software manufacturer for assistance
事实上,我已经尝试过适用于 python 的 2.5、2.6 和 2.7 dmg 安装程序,在安装所有 3 个版本时,我遇到了同样的错误。
我正在运行操作系统 10.6.8
有任何想法吗?有没有更好/不同的方法在 Mac 上安装 Python?
更新:
当我打开安装程序日志时,我看到以下一些问题:
我遇到了很多此类错误:
Sep 19 14:04:39 thething pkgExtractor[1689]: BomFatalError - cpio read error: bad file format
Sep 19 14:04:39 thething pkgExtractor[1689]: Package Authoring Error: Package "PythonSystemFixes-2.6.pkg" is using a deprecated archive format. Running in compatibility mode.
最后我得到了这个:
Sep 19 14:04:40 thething Installer[1641]: run postflight script for Fix system Python
Sep 19 14:04:40 thething runner[1657]: postflight[1722]: Could not find platform independent libraries <prefix>
Sep 19 14:04:40 thething runner[1657]: postflight[1722]: Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Sep 19 14:04:40 thething runner[1657]: postflight[1722]:
Sep 19 14:04:40 thething runner[1657]: postflight[1722]: 'import site' failed; use -v for traceback
Sep 19 14:04:40 thething runner[1657]: postflight[1722]: Traceback (most recent call last):
Sep 19 14:04:40 thething runner[1657]: postflight[1722]: File "/Volumes/Python 2.6.6/Python.mpkg/Contents/Packages/PythonSystemFixes-2.6.pkg/Contents/Resources/postflight", line 16, in <module>
Sep 19 14:04:40 thething runner[1657]: postflight[1722]: import os
Sep 19 14:04:40 thething runner[1657]: postflight[1722]: ImportError: No module named os
Sep 19 14:04:40 thething runner[1657]: postflight[1722]:
Sep 19 14:04:40 thething Installer[1641]: Install failed: The following installation step failed: run postflight script for Fix system Python. Contact the software manufacturer for assistance.
Sep 19 14:04:40 thething Installer[1641]: IFDInstallController 207240 state = 7
Sep 19 14:04:40 thething Installer[1641]: Displaying 'Install Failed' UI.
Sep 19 14:04:40 thething Installer[1641]: 'Install Failed' UI displayed message:'The following installation step failed: run postflight script for Fix system Python. Contact the software manufacturer for assistance.'.