我正在运行osx 10.8.5。和xcode 5.1.1。 我跑的时候
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.6.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
我很困惑。在我的/ Applications文件夹中,当我运行Xcode时,它会报告5.11。 我跑的时候
xcode-select -print-path
我指向正确的目录
/Applications/Xcode.app/Contents/Developer
我该如何解决这个问题?
答案 0 :(得分:1)
花了我4个小时才弄明白:gist.github.com/xlfe/7786057
修改 - 链接中包含的内容:
# Pre-requsites:
# X-code 5.0.1 with command line tools
# Homebrew, homebrew python, homebrew pip
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc-4.2
export CXX="g++ -arch i386 -arch x86_64"
brew install gfortran
brew install apple-gcc42
pip install cython
#use existing brews
brew tap samueljohn/python
brew tap homebrew/science
pip install nose
#installs numpy as a dependency
brew install scipy
pip install scikit-learn