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.
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
- Yum install numpy
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
- Yum install scipy
Install pip
[Plain]View plaincopy
- Wget http://python-distribute.org/distribute_setup.py
- Python distribute_setup.py
- Wget https://github.com/pypa/pip/raw/master/contrib/get-pip.py
- Python get-pip.py
Enter the pip command. if you can see the pip introduction information, the installation is successful.
[Plain]View plaincopy
- Pip install-U scikit-learn
Prompt that the installation is successful, then you can start the scikit-learn journey
If gcc is not installed, first
Install Gcc and g ++ [Plain]View plaincopy
- Yum install gcc
- Yum install gcc-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.