Python 2.7 在OS-X上使用macport安装scikit learn时出错

Python 2.7 在OS-X上使用macport安装scikit learn时出错,python-2.7,osx-mountain-lion,macports,scikit-learn,Python 2.7,Osx Mountain Lion,Macports,Scikit Learn,在OS-X上安装scikit learn时出现以下错误 MacBook-Pro:~ $ sudo port install py27-scikit-learn Error: The installed version of Xcode (2.0orlower) is too old to use on the installed OS version. Version 4.5.2 or later is recommended on Mac OS X 10.8. To report a bug,

在OS-X上安装scikit learn时出现以下错误

MacBook-Pro:~ $ sudo port install py27-scikit-learn
Error: The installed version of Xcode (2.0orlower) is too old to use on the installed OS version. Version 4.5.2 or later is recommended on Mac OS X 10.8.
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-scikit-learn failed
下面是我机器上的各种版本的软件

OS

  ~ $ uname -a
    Darwin MacBook-Pro.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Python

$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
$ port
MacPorts 2.1.3
Entering interactive mode... ("help" for help, "quit" to quit)
Xcode

  Version:  3.2 (10M2423)
  Location: /Developer
  Applications:
  Xcode:    3.2.5 (1760)
  Interface Builder:    3.2.5 (823)
  Instruments:  2.7 (3017)
  Dashcode: 3.0.2 (333)
  SDKs:
  iOS:
  4.2:  (8C134)
  iOS Simulator:
  3.2:  (7W367a)
  4.0:  (8A400)
  4.1:  (8B117)
  4.2:  (8C134)
  Other:
  10.5: (9L31a)
  10.6: (10M2423)
端口

$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
$ port
MacPorts 2.1.3
Entering interactive mode... ("help" for help, "quit" to quit)

您需要一个更新的Xcode-在AppStore中提供,然后下载命令行工具。