我从 10.6 升级到 Mac OS X 10.7。
然后 Mercurial 不再工作,当我重新安装 Mercurial 时,错误消息跳出如下:
$ sudo pip install -U Mercurial
下面的第一个错误行:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20,
from mercurial/osutil.c:523:
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21:19: error: AE/AE.h: No such file or directory
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:25:35: error: CarbonCore/CarbonCore.h: No such file or directory
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:29:35: error: OSServices/OSServices.h: No such file or directory
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:33:43: error: CoreFoundation/CoreFoundation.h: No such file or directory
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37:33: error: CFNetwork/CFNetwork.h: No such file or directory
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:41:43: error: LaunchServices/LaunchServices.h: No such file or directory
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/SearchKit.framework/Headers/SearchKit.h:30,
from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:45,
from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20,
from mercurial/osutil.c:523:
/System/Library/Frameworks/CoreServices.framework/Frameworks/SearchKit.framework/Headers/SKDocument.h:20:35: error: CoreFoundation/CFBase.h: No such file or directory
这里有数千行错误遗漏...
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSTypes.h:242: error: declaration for parameter ‘FMFontDirectoryFilter’ but no such parameter
mercurial/osutil.c:580: error: expected ‘{’ at end of input
error: command 'llvm-gcc-4.2' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/Users/patto/dev/django/hg_fuwo/build/Mercurial/build/Mercurial/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-ZYZ6B4-record/install-record.txt failed with error code 1 in /Users/patto/dev/django/hg_fuwo/build/Mercurial/build/Mercurial
Storing complete log in /Users/patto/Library/Logs/pip.log
patto@mac:Mercurial > hg summary
Traceback (most recent call last):
File "/usr/local/bin/hg", line 4, in <module>
import pkg_resources
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: mercurial==1.9
我搜索了几个解决方案,但没有一个有效:
- 使用 python setup.py install 。不行!
- 安装Kenneth Reitz 的漂亮软件包。不行!
还有更多的解决方案吗?