Python的机器学习库scikit-learn、绘图库Matplotlib的安装

来源:互联网 发布:centos 7服务器dvd安装 编辑:程序博客网 时间:2024/06/05 16:34

在windows环境下安装scipy和sklearn是一件比较麻烦的事情。由于sklearn依赖于numpy和scipy,所以安装sklearn之前需要先安装numpy和scipy库,然而使用pip安装安装时,pip install numpy 可以安装成功,但是使用命令pip intall scipy安装scipy的时候就会遇到错误。笔者使用了如下的方法解决问题:

一、卸载原始版本(且切换到python的安装目录)

使用命令 pip uninstall numpy
      pip uninstall matplotlib卸载原来的版本;

可以到官网下载相应的版numpy下载,scipy下载,matplotlib下载,scikit下载。后面需要使用文件的路径。

二、使用命令安装(还是在python的安装目录)

1、安装numpy


2、安装scipy

3、安装matplotlib


4、安装scikit


0 0