In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install scikit-learn under the CentOS system". In the daily operation, I believe many people have doubts about how to install scikit-learn under the CentOS system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubts of "how to install scikit-learn under the CentOS system". Next, please follow the editor to study!
Just read the official documents for ubuntu.
Http://scikit-learn.org/stable/install.html
I use a centOS,python of 2.7.3
You can read this article about how to change the version of python to 2.7.3. The following installation of python is transferred from this connection.
1. Download Python-2.7.3
Wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 、
two。 Decompress Python-2.7.3
Tar-jxvf Python-2.7.3.tar.bz2
3. Enter the newly unzipped folder
Cd Python-2.7.3
4. Installation
The code is as follows:
$. / configure
$make all
$sudo make install
$make clean
$make distclean
5. View version information
/ usr/local/bin/python2.7-V
6. Establish a soft connection so that the default python of the system points to python2.7
Under normal circumstances, even after the python2.7 installation is successful, the system defaults to python version 2.6.6. Considering that yum can only work properly based on python2.6.6, you dare not uninstall it easily.
How to point the default python of the system to version 2.7?
The code is as follows:
Mv / usr/bin/python / usr/bin/python2.6.6
Ln-s / usr/local/bin/python2.7 / usr/bin/python
7. After solving the problem that the system python soft link points to the python2.7 version, the yum does not work properly
The code is as follows:
Vi / usr/bin/yum
The header of the file
#! / usr/bin/python
Change to
#! / usr/bin/python2.6.6
The entire upgrade process is complete and the Python2.7.3 version is ready to use.
Install numpy and scipy
The code is as follows:
Sudo yum install numpy.x86_64
Sudo yum install scipy.x86_64
Install pip
The code is as follows:
# wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb"-- no-check-certificate
# tar-xzvf pip-1.5.4.tar.gz
# cd pip-1.5.4
# python setup.py install
Enter pip if you can see the information to prove that the installation is successful.
Install scikit-learn
The code is as follows:
Pip install-U scikit-learn
The Successfully installed scikit-learn indicates that the installation was successful.
At this point, the study on "how to install scikit-learn under the CentOS system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.