How to install scikit-learn in CentOS

Source: Internet
Author: User

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
  1. 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
  1. Yuminstallscipy


Install pip

[Plain] view plaincopy
  1. Wgethttp: // python-distribute.org/distribute_setup.py
  2. Pythondistribute_setup.py
  3. Wgethttps: // github.com/pypa/pip/raw/master/contrib/get-pip.py
  4. Pythonget-pip.py

Enter the pip command. If you can see the pip Introduction Information, the installation is successful.

[Plain] view plaincopy
  1. 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
  1. Yuminstallgcc
  2. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.