I always wanted to use scikit-learn to learn machine learning, but I had a previous installation failure in windows, and now there is still a shadow. At that time, the relationship between many dependent libraries may not be clear. Easy_install can solve the dependency problem, but easy_install cannot be used for some special reasons. Now I will describe how I installed scikit-learn on centOS.
The centOS version I used is python 2.6.6 of 6.5, and the installation method of python2.7.3 is available on the Internet. Because my system defaults to python2.6.6, I will not try to update the version.
Install numpy
[Plain] view plaincopy
- Yuminstallnumpy
In addition to numpy, you will see the following software in the list: atlas libgfortran pytho-nose python-setuptools, which are dependent libraries.
Install scipy
[Plain] view plaincopy
- Yuminstallscipy
Install pip
[Plain] view plaincopy
- Wgethttp: // python-distribute.org/distribute_setup.py
- Pythondistribute_setup.py
- Wgethttps: // github.com/pypa/pip/raw/master/contrib/get-pip.py
- Pythonget-pip.py
Enter the pip command. If you can see the pip Introduction Information, the installation is successful.
[Plain] view plaincopy
- Pipinstall-Uscikit-learn
Prompt that the installation is successful, then you can start the scikit-learn journey
If gcc is not installed, first
InstallGcc and g ++ [plain] view plaincopy
- Yuminstallgcc
- Yuminstallgcc-c ++
Basically, the installation can be completed according to the above steps. At least I can install and use it. You can go to the official website and use a few routine tests.