Ubuntu Python 安装numpy SciPy、MatPlotLib环境
安装
sudo apt-get install python-scipy
sudo apt-get install python-numpy
sudo apt-get install python-matplotlib
测试
#test plot
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm fig = plt.figure()
ax = fig.gca(projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm) ax.set_xlabel('X')
ax.set_xlim(-40, 40)
ax.set_ylabel('Y')
ax.set_ylim(-40, 40)
ax.set_zlabel('Z')
ax.set_zlim(-100, 100) plt.show() #test numpy
from numpy import *
print random.rand(4,4) #test scipy
import numpy as np
from scipy.stats import beta
from matplotlib.pyplot import hist, plot, show obs = beta.rvs(5, 5, size=2000) # 2000 observations
hist(obs, bins=40, normed=True)
grid = np.linspace(0.01, 0.99, 100)
plot(grid, beta.pdf(grid, 5, 5), 'k-', linewidth=2)
show()
[[ 0.65980666 0.55674039 0.15432447 0.63885279]
[ 0.77583865 0.78290332 0.31575893 0.12678885]
[ 0.67791378 0.86333224 0.97039675 0.95323786]
[ 0.31306339 0.54107452 0.79611926 0.05306962]]
Ubuntu Python 安装numpy SciPy、MatPlotLib环境的更多相关文章
- ubuntu python 安装numpy,scipy.pandas.....
http://blog.csdn.net/Yakumoyukarilan/article/details/51340358
- Ubuntu下安装Numpy, SciPy and Matplotlib
Python开发环境包含科学计算,需要安装NumPy, SciPy, Matplotlib.其中Matplotlib依赖于Python和NumPy.我们先安装NumPY和SciPy. Matplot ...
- win7系统下python安装numpy,matplotlib,scipy和scikit-learn
1.安装numpy,matplotlib,scipy和scikit-learn win7系统下直接采用pip或者下载源文件进行安装numpy,matplotlib,scipy时会遇到各种问题,这是因为 ...
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
这篇文章主要讲述Python如何安装Numpy.Scipy.Matlotlib.Scikit-learn等库的过程及遇到的问题解决方法.最近安装这个真是一把泪啊,各种不兼容问题和报错,希望文章对你有所 ...
- Linux入门(10)——Ubuntu16.04使用pip3和pip安装numpy,scipy,matplotlib等第三方库
安装Python3第三方库numpy,scipy,matplotlib: sudo apt install python3-pip pip3 install numpy pip3 install sc ...
- 在windows下python,pip,numpy,scipy,matplotlib的安装
系统:win7(64bit) 如果只需要安装python,执行步骤一就可以了,不用管后面.如果还需要其它的库,则只需要执行第二步,第一步可省略(因为在安装anaconda的时间,python就自动装好 ...
- win7 64+python2.7.12安装numpy+scipy+matplotlib+scikit-learn
python包下载网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/ 1.已经安装python2.7.12,查看scripts里是否有pip.2.7.9版本以上 ...
- Python安装Numpy,matplotlib库
<1> Numpy是一款基于python的功能强大的科学计算包.要安装numpy首先你得先安装python. python的安装非常简单,本人安装的是python2.7 具体安装步骤如下: ...
- mac安装numpy,scipy,matplotlib
SaintKings-Mac-mini:~ saintking$ python Python ( , ::) [GCC Compatible Apple LLVM (clang-)] on dar ...
随机推荐
- synthesis-of-weak-property-only-allowed-in-arc-or-gc-mode ARC属性
synthesis-of-weak-property-only-allowed-in-arc-or-gc-mode ARC属性 错误提示: 1:确认你的项目是 ARC环境: 2:如果 ARC下出现上面 ...
- css3和html5的学习
本文是此链接的源代码.http://www.imooc.com/learn/77 关于的html5的使用: transition----含义是:过渡的过程,能够对各种属性设置变化. 有5中过渡的形式: ...
- 深入理解javascript闭包【整理】
原文链接:http://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html 英文原文:http://www.jibb ...
- mysql数据库创建删除带横杠的数据库名
mysql> create database d-d; ERROR 1064 (42000): You have an error in your SQL syntax; check the m ...
- mac 系统使用macaca inspector 获取iphone真机应用元素
1.安装brew 软件包管理工具:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/inst ...
- 从JavaScript 数组去重看兼容性有关问题,及性能优化(摘自玉伯博客)
JavaScript 数组去重经常出现在前端招聘的笔试题里,比如: 有数组 var arr = ['a', 'b', 'c', '1', 0, 'c', 1, '', 1, 0],请用 JavaScr ...
- 微信小程序请求wx.request数据,渲染到页面
先说一下基本使用.官网也有. 比如说你在App.js里面有这些变量.想修改某些值. data: { main_view_bgcolor: "", border: "&qu ...
- Fastboot和Recovery
Fastboot是什么意思?从字面意思来讲,Fastboot是『快速启动』的意思.通常大家所讨论的Fastboot,通常都是说安卓手机的Fastboot模式.在安卓手机中fastboot是一种比rec ...
- python 使用pyinstaller,pywin32打包.py成.exe应用程序
想将编写的Python代码在别人的电脑上运行,由于没有配置python的环境,这就有了困难.搜索学习了下,借助一定的工具可以将python程序的.py文件打包为exe文件,当然有多种方法,本文介绍的方 ...
- python (18)在linux中如何实现定时发送邮件到指定邮箱,监测任务
最近要用到,定时发送邮件功能: 如何定时,当然要用到linux中crontab了 如下的代码能够定时发送邮件 #!/usr/bin/env python # -*- coding=utf-8 -*- ...