Scikit learn 在mac osx 10.7.5上安装scikit learn时遇到问题
通过下面的设置,我正在尝试安装scikit learn-最终目标是使用scikit learn with python笔记本进行数据操作 尝试了pip相同的错误,尝试了easy_安装相同的错误,尝试了scipy超级包,但它使用了64位python发行版,无法正常工作。因此,在当前的设置中,我如何使scikit的简易安装工作。发生故障表明无法找到C++头文件,我如何解决这个问题。Scikit learn 在mac osx 10.7.5上安装scikit learn时遇到问题,scikit-learn,Scikit Learn,通过下面的设置,我正在尝试安装scikit learn-最终目标是使用scikit learn with python笔记本进行数据操作 尝试了pip相同的错误,尝试了easy_安装相同的错误,尝试了scipy超级包,但它使用了64位python发行版,无法正常工作。因此,在当前的设置中,我如何使scikit的简易安装工作。发生故障表明无法找到C++头文件,我如何解决这个问题。 which python /Library/Frameworks/Python.framework/Versions
which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
python
Enthought Python Distribution (EPD) free version -- www.enthought.com
Version: 7.3-2 (32-bit)
(type 'upgrade' or see www.enthought.com/epd/upgrade to get the full EPD)
Python 2.7.3 |EPD_free 7.3-2 (32-bit)| (default, Apr 12 2012, 11:28:34)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Python version 2.7.3
scipy==0.10.1
numpy==1.6.1
pandas==0.10.1
easy_install -U scikit-learn
Searching for scikit-learn
Reading http://pypi.python.org/simple/scikit-learn/
Reading http://scikit-learn.org
Reading http://sourceforge.net/projects/scikit-learn/files/
Reading http://scikit-learn.sourceforge.net
Best match: scikit-learn 0.13.1
Downloading http://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0.13.1.tar.gz#md5=acba398e1d46274b8470f40d0926e6a4
Processing scikit-learn-0.13.1.tar.gz
Writing /tmp/easy_install-FrggHE/scikit-learn-0.13.1/setup.cfg
Running scikit-learn-0.13.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-FrggHE/scikit-learn-0.13.1/egg-dist-tmp-mGaDaU
Partial import of sklearn during the build process.
In file included from /private/tmp/easy_install-FrggHE/scikit-learn-0.13.1/sklearn/svm/src/libsvm/libsvm_template.cpp:6:
/private/tmp/easy_install-FrggHE/scikit-learn-0.13.1/sklearn/svm/src/libsvm/svm.cpp:53:18: error: math.h: No such file or directory
/private/tmp/easy_install-FrggHE/scikit-learn-0.13.1/sklearn/svm/src/libsvm/svm.cpp:54:19: error: stdio.h: No such file or directory
..etc
编译器安装有问题:C++编译器找不到基本标头。尝试重新配置或重新安装Xcode(或您使用的任何东西)。@larsmans。谢谢你的提示。我确实找不到C++库的标题。使用osx mountain lion的预构建二进制文件更新了我的gcc。安装后,我能够安装scikit learn 1)从github下载scikit learn软件包:a)、b)运行make和c)运行sudo python2.7 setup.py install太棒了,学习愉快!