Install sklearn under windows system

A. The sklearn library is developed on the basis of Numpy, Scipy, and matplotlib, so these dependent libraries need to be installed before installing sklearn.

(1) Install Numpy and go to
the official website numpy.PyPI to download the file, pay attention to the version of the file, such as "numpy-1.18.1-cp37-cp37m-win_amd64.whl" means that the file is suitable for 64-bit Python3.7 under the widows operating system; Open the DOS command line window of Windows under the path of the downloaded file, and execute the following command: pip install numpy-1.18.1-cp37-cp37m-win_amd64.whl. (2) Go to the official website scipy.PyPI to download the file, and the subsequent steps are the
same as ( 1).
(3) Go to the official website matplotlib.PyPI to download the file, the subsequent steps are the same as (1).
(4) Go to the official website scikit-learn.PyPI to download the file, the subsequent steps are the same as (1).

B. Possible problems:

(1) If using pip install 'dependency library' directly on the command line always fails, it is recommended to use the above method: download the corresponding file from the official website and install it under the file path; (2) If the installation fails and prompts that pip needs to be updated, it is
recommended Reinstall after updating pip;
(3) If your computer has both Python2 and Python3 installed, it is recommended to use pip3 install 'dependency library';
(4) If the installation error prompts a version problem, it means that the downloaded file version is wrong, you should go to the official website to download Files that match your computer environment.

Guess you like

Origin blog.csdn.net/PanYiAn9/article/details/104768578