python 安装numpy,scipy,matplotlib算法库
来源:互联网 发布:什么叫大数据产业 编辑:程序博客网 时间:2024/05/17 23:21
官方库下载: https://pypi.python.org/pypi
1.安装Numpy,可以用
sudo apt-get install python-numpy
也可以到http://sourceforge.net/projects/numpy/files/下载最新版本的Numpy
如果是自己下载的文件进行安装,首先要确保本地有GCC,这个一般都有,然后需要先安装几个支撑库:
sudo apt-get install gfortransudo apt-get install python-nosesudo apt-get install libatlas-base-dev
之后,就可以在解压目录下,利用:sudo python setup.py install进行安装。
一般建议直接用sudo apt-get install python-numpy安装,比较简洁。
2.安装Scipy
这个和Numpy的安装方式基本一致
sudo apt-get install python-scipy
也可以自行到sourceforge网站下载。
3.Matplotlib
这个是最麻烦的一个,主要是因为安装这个的时候,需要先装几个其他库,不然会导致安装matplotlib虽然不会报错,但利用plot指令画图时,不会有任何响应。
需要安装带是Tk-dev库和gtk2.0-dev,pyside库,如果本地没有Qt,Qt4,也要安装
sudo apt-get install tk-devsudo apt-get install python-gtk2-devsudo apt-get install python-pysidesudo apt-get install python-matplotlib
测试:
# coding: utf-8 import numpy as np from numpy import * import matplotlib.pyplot as plt dataset = [[-0.0176, 14.053061], [-1.395634, 4.662541], [-0.752157, 6.5386], [-1.322371, 7.15852]]; dataMat = mat(dataset).T plt.scatter(dataMat[0], dataMat[1], c='red', marker='o') X = np.linspace(-2,2,100) Y = 2.8*X+9 plt.plot(X,Y) plt.show()
0 0
- python 安装numpy,scipy,matplotlib算法库
- python:安装numpy, Scipy,Matplotlib
- python及常用库numpy、scipy、matplotlib安装与卸载
- ubuntu 下 python numpy,scipy,matplotlib安装
- python scipy numpy matplotlib傻瓜式安装
- 安装配置Python+Numpy+Scipy+Matplotlib环境
- Python: Ubuntu 安装numpy,scipy,matplotlib
- python下安装numpy、matplotlib、scipy过程
- Python安装Numpy,SciPy和MatplotLib
- Python 之 安装 scipy,numpy,matplotlib,pandas
- windows下python,numpy,scipy,matplotlib安装
- Python中的Numpy、SciPy、MatPlotLib安装教程
- Python:Ubuntu安装numpy,scipy,matplotlib
- python如何安装Numpy、SciPy、MatPlotLib
- python安装numpy/scipy/matplotlib/sklearn模块
- Python: Ubuntu 安装numpy,scipy,matplotlib
- 在python中安装Numpy、MatPlotLib、SciPy
- Python 下载并安装numpy matplotlib scipy
- redis
- Android Framework中的线程Thread及它的threadLoop方法
- 阿里云听课记录
- Microsoft Visual Studio 发展历程
- jdk8——你可能错过的java7特性
- python 安装numpy,scipy,matplotlib算法库
- NKOI 3659 硬币
- Linux脚本攻略第六章总结
- UITableViewCell上添加按钮区分点击方法
- ES-MongoDB学习7_CentOS6.5下Mongo-connector的安装和操作
- 杭电oj-1047-Integer Inquiry
- window环境下安装composer心得
- XML 新手入门基础知识
- 算法第四版环境配置