安装

sudo apt-get install python-scipy
sudo apt-get install python-numpy
sudo apt-get install python-matplotlib

测试

  1. #test plot
  2. from mpl_toolkits.mplot3d import axes3d
  3. import matplotlib.pyplot as plt
  4. from matplotlib import cm
  5.  
  6. fig = plt.figure()
  7. ax = fig.gca(projection='3d')
  8. X, Y, Z = axes3d.get_test_data(0.05)
  9. ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
  10. cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
  11. cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
  12. cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
  13.  
  14. ax.set_xlabel('X')
  15. ax.set_xlim(-40, 40)
  16. ax.set_ylabel('Y')
  17. ax.set_ylim(-40, 40)
  18. ax.set_zlabel('Z')
  19. ax.set_zlim(-100, 100)
  20.  
  21. plt.show()
  22.  
  23. #test numpy
  24. from numpy import *
  25. print random.rand(4,4)
  26.  
  27. #test scipy
  28. import numpy as np
  29. from scipy.stats import beta
  30. from matplotlib.pyplot import hist, plot, show
  31.  
  32. obs = beta.rvs(5, 5, size=2000) # 2000 observations
  33. hist(obs, bins=40, normed=True)
  34. grid = np.linspace(0.01, 0.99, 100)
  35. plot(grid, beta.pdf(grid, 5, 5), 'k-', linewidth=2)
  36. 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环境的更多相关文章

  1. ubuntu python 安装numpy,scipy.pandas.....

    http://blog.csdn.net/Yakumoyukarilan/article/details/51340358

  2. Ubuntu下安装Numpy, SciPy and Matplotlib

    Python开发环境包含科学计算,需要安装NumPy, SciPy, Matplotlib.其中Matplotlib依赖于Python和NumPy.我们先安装NumPY和SciPy.  Matplot ...

  3. win7系统下python安装numpy,matplotlib,scipy和scikit-learn

    1.安装numpy,matplotlib,scipy和scikit-learn win7系统下直接采用pip或者下载源文件进行安装numpy,matplotlib,scipy时会遇到各种问题,这是因为 ...

  4. [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决

    这篇文章主要讲述Python如何安装Numpy.Scipy.Matlotlib.Scikit-learn等库的过程及遇到的问题解决方法.最近安装这个真是一把泪啊,各种不兼容问题和报错,希望文章对你有所 ...

  5. Linux入门(10)——Ubuntu16.04使用pip3和pip安装numpy,scipy,matplotlib等第三方库

    安装Python3第三方库numpy,scipy,matplotlib: sudo apt install python3-pip pip3 install numpy pip3 install sc ...

  6. 在windows下python,pip,numpy,scipy,matplotlib的安装

    系统:win7(64bit) 如果只需要安装python,执行步骤一就可以了,不用管后面.如果还需要其它的库,则只需要执行第二步,第一步可省略(因为在安装anaconda的时间,python就自动装好 ...

  7. 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版本以上 ...

  8. Python安装Numpy,matplotlib库

    <1> Numpy是一款基于python的功能强大的科学计算包.要安装numpy首先你得先安装python. python的安装非常简单,本人安装的是python2.7 具体安装步骤如下: ...

  9. mac安装numpy,scipy,matplotlib

      SaintKings-Mac-mini:~ saintking$ python Python ( , ::) [GCC Compatible Apple LLVM (clang-)] on dar ...

随机推荐

  1. js冒泡法和数组转换成字符串

    js代码: window.onload = function(){ var mian = document.getElementById( "mian" ); var mian1 ...

  2. Android 再按一次退出应用的代码

    private long exitTime = 0; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (key ...

  3. 开源微内核seL4

    微内核 越大的系统潜在的bug就越多.所以微内核在降低bug方面非常有优势,seL4是世界上最小的内核之中的一个.可是seL4的性能能够与当今性能最好的微内核相比. 作为微内核,seL4为应用程序提供 ...

  4. 谁占用了我的Buffer Pool?--【转】

    转自:http://blogs.msdn.com/b/apgcdsd/archive/2011/01/11/buffer-pool.aspx 我在做SQL Server 7.0技术支持的时候有客户问我 ...

  5. TFS创建登录用户并连接TFS

    简单使用 1.创建TFS组(Windows的组) 2.在“TFS管理控制台”中设置“组成员资格” 3.给“Team Foundation Administrators”组设置“属性” 4.给“Team ...

  6. jquery 属性操作 attr( ) prop()css( )区别

    一 attr () 和 prop( ) 操作属性 谈谈我的总结: 1 2 1 属性的定义,根据W3C手册所述:属性包括,标准属性:id class style title 语言属性 lang dir以 ...

  7. 三维模型 DAE 导出格式结合 OpenGLES 要素浅析

    三维模型 DAE 导出格式结合 OpenGLES 要素浅析 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循"署名-非商业用途-保持一致&quo ...

  8. HDU 1695 GCD(容斥定理)

    GCD Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submis ...

  9. Leetcode Copy List with Random Pointer(面试题推荐)

    给大家推荐一道leetcode上的面试题,这道题的详细解说在<剑指offer>的P149页有思路解说.假设你手头有这本书.建议翻阅. 题目链接 here A linked list is ...

  10. JSON对象和JSON字符串以及JSON.parse 函数的使用

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...