|  |      3ectotherm OP @sinxccc 我在4.3上app store的当天晚上从macports mailing list就看到这个方法,然后macports可以工作了,但distutils还是不行 不会要重现编译python吧 | 
|      4reeze      2012-02-29 10:52:19 +08:00 @ectotherm 去xcode -> perferences -> Downloads -> Components  下载个command line tools就好了。 | 
|  |      5ectotherm OP @reeze 这个当然已经装了,跟distutils安装没有关系。distutils只认/Developer/usr/bin/clang,直接把Xcode.app/Contents/.../usr/bin直接ln出来就可以了,但是我想找找看还有没有更优美的做法。 比如之前macports 2.03不能用xcode 4.3工作,但升级到svn macports 2.19就可以了。我要的是这样的方法。 | 
|  |      6ant_sz      2012-02-29 13:37:07 +08:00 ln -s 正解 | 
|  |      8lldong      2012-03-05 23:23:37 +08:00 @ectotherm  或许这样可以 `sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/` | 
|  |      10ashchan      2012-03-06 09:57:35 +08:00 @lldong @ectotherm @sinxccc 正确的 `xcode-select -switch` 用法是: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | 
|  |      11sinxccc      2012-03-06 10:22:33 +08:00 @ashchan "xcode-select -switch /Applications/Xcode.app" 的写法是 manpage 里的 example,而且这样设置之后用 "xcode-select -print-path" 看到的路径也已经是 "/Applications/Xcode.app/Contents/Developer" 了。 % sudo xcode-select -switch /Applications/Xcode.app Password: % xcode-select -print-path /Applications/Xcode.app/Contents/Developer |