scikit-learnのcygwin、windows8への導入

scikit-learnのcygwinwindows8への導入
昔は難しかったみたいだけど、今は簡単になったのかも。

(1)cygwinのsetup.exe等でnumpy,python,easy_install、gcc, gcc-fortran など必要そうなものをいれておく.
(2) easy_install pip
(3) pip install scipy <-すごく時間がかかる
(4) pip install -U scikit-learn

古いlinuxの場合pythonの更新が必要あり

1195 wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
1196 gzip -d Python-2.7.10.tgz
1197 cd Python-2*
1198 ls -F | grep Py*
1199 tar -xvf Py*
1201 cd Py*
1204 sudo make install
1205 ./configure
1206 sudo make install

easy_installのインストール

1281 wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
sudo python ez_setup.py --insecure

必要なものは以下で確認
http://chiranoura.nobody.jp/articles/2015-06-30_01_how_to_install_scipy/

lapack
liblapack-devel
liblapack0
bc
ffftw3
libfftw3-devel
libfftw3_3
libgmp10
libgmpxx4
libmpc3
libmpfr4
python-numpy(python3-numpy)
gcc-fortran

以下のエラーでscipyのインストールが失敗する場合 Windows 8 cygwin 64

_import_array(void)
^
error: Command "g++ -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.x86_64/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.x86_64/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/python2.7 -I/usr/lib/python2.7/site-packages/numpy/core/include -Iscipy/spatial/ckdtree/src -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c scipy/spatial/ckdtree/src/ckdtree_query.cxx -o build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/ckdtree/src/ckdtree_query.o" failed with exit status 1

----------------------------------------
Command "/usr/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-sHTtPD/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-oDuuqx-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-sHTtPD/scipy

以下に対処法

pip install scipy==0.15.0

http://stackoverflow.com/questions/31846330/installing-scipy-in-cygwin