1. 程式人生 > >Python的機器學習庫scikit-learn、繪相簿Matplotlib的安裝

Python的機器學習庫scikit-learn、繪相簿Matplotlib的安裝

在windows環境下安裝scipy和sklearn是一件比較麻煩的事情。由於sklearn依賴於numpy和scipy,所以安裝sklearn之前需要先安裝numpy和scipy庫,然而使用pip安裝安裝時,pip install numpy 可以安裝成功,但是使用命令pip intall scipy安裝scipy的時候就會遇到錯誤。筆者使用瞭如下的方法解決問題:

一、解除安裝原始版本(且切換到python的安裝目錄)

使用命令 pip uninstall numpy
pip uninstall matplotlib解除安裝原來的版本;

二、使用命令安裝(還是在python的安裝目錄)

1、安裝numpy


2、安裝scipy

3、安裝matplotlib


4、安裝scikit