1.1 Linux中安装matplotlib
  • 如果使用的系统自带的python版本,可使用系统的包管理器安装matplotlib,命令如下:
$ sudo apt-get install python3-matplotlib
  • 如果使用python2.7,命令如下:
$ sudo apt-get install python-matplotlib
  • 如果安装了较新的python版本,就必须安装matplotlib依赖的一些库:
$ sudo apt-get install python3.5-dev python3.5-tk tk-dev
$ sudo apt-get install libfreetype-dev g++
  • 再使用pip来安装matplotlib:
pip install --user matplotlib
1.2 在OS X系统中安装matplotlib
  • Apple的标准python安装自带matplotlib。如果没有,且python是使用homebrew安装的,可使用命令安装matplotlib:
$ pip install --user matplotlib

备注:安装包时可能需要使用pip3。另外,如果这个命令不能用,删除标志--user。

1.3 在windows中安装matplotlib
  • 先安装Visual studio,地址:https://dev.windows.com,下载Visual Studio Community。
  • 下载matplotlib,地址:https://pypi.python.org/pypi/matplotlib/,下载与你使用的python版本匹配的wheel文件(扩展名为.whl的文件)。例如:python3.5,则需要下载matplotlib-1.4.3-cp35-none-win32.whl。
  • 将.whl文件复制到项目文件夹,在该文件夹下打开命令窗口(在文件夹下按住Shift键-右键-打开cmd窗口),使用pip安装matplotlib:
> cd python_work
python_work> python -m pip install --user matplotlib-1.4.3-cp35-none-win32.whl
1.4 测试matplotlib
$ python3
>>> import matplotlib
>>>

如果没有出现任何错误信息,就说明你安装了matplotlib。

1.5 matplotlib画廊

安装matplotlib的更多相关文章

  1. uwsgi+flask环境中安装matplotlib

    uwsgi+flask的python有自身的virtual environment,可以通过如下命令进入 . venv/bin/activate 虽然通过sudo apt-get install py ...

  2. Python 安装matplotlib,six,dateutil,pyparsing 完整过程

    [摘要:正在做词频剖析的时间,须要用matlotlib 做图表,柱状图啥的,因而便最先了一个又一个的装置库的进程 由于matplotlib 须要依附很多其他科教盘算的第三圆库,须要一个一个的装置了.. ...

  3. ubuntu安装matplotlib一些坑

    ubuntu16.04,python2.7 安装matplotlib, 1.在root权限下执行命令 pip install matplotlib==1.5.1 这里有个困扰我一个星期的问题,系统都被 ...

  4. Ubuntu10.04 python2.6下安装matplotlib环境

    一.准备工作1.sudo apt-get install python-numpy2.sudo apt-get install python2.6-dev3.sudo apt-get install ...

  5. Ubuntu 安装 matplotlib

    参考: ubuntu16 安装matplotlib Ubuntu 安装 matplotlib sudo apt-get install libpng-dev libfreetype6-dev pkg- ...

  6. ubuntu16 安装matplotlib

    在安装ubuntu安装matplotlib时碰到不少问题,简单做个备忘: 需要先安装其依赖的包libpng和freetype 安装libpng: sudo apt-get install libpng ...

  7. 为python安装matplotlib模块

    matplotlib是python中强大的画图模块. 首先确保已经安装python,然后用pip来安装matplotlib模块. 进入到cmd窗口下,执行python -m pip install - ...

  8. Python3.x(windows系统)安装matplotlib库

    Python3.x(windows系统)安装matplotlib库 cmd命令: pip install matplotlib 执行结果:

  9. 在tensorflow环境下安装matplotlib

    在运行程序时,报错ImportError: No module named 'matplotlib',如图.经网上查询发现是没有安装matplotlib 因此记录一下在tensorflow环境下安装m ...

随机推荐

  1. Check类之duplicate declaration checking/Class name generation/Type Checking

    1.duplicate declaration checking /** Check that variable does not hide variable with same name in * ...

  2. echart 桑基图操作事项

    例图 注意: option = { label:{//formatter名字 show:true, formatter:function(obj){ return obj.data.name+'_12 ...

  3. UTF8最好不要带BOM

    摘自:http://www.cnblogs.com/findumars/p/3620078.html   几周前还在为BOM的问题苦恼着...正如@梁海所说,“不含 BOM 的 UTF-8 才是标准形 ...

  4. MYSQL 复制详解

    MySql 复制介绍 MySQL复制允许将主实例(master)上的数据同步到一个或多个从实例(slave)上,默认情况 下复制是异步进行的,从库也不需要一直连接到主库来同步数据 MySQL复制的数据 ...

  5. 笔记二:python编码详解

    一:学习内容 python编码讲解 python编码说明 python中文乱码解决三部曲 二:python编码讲解 1. ASCII编码 美国信息交换标准代码(American Standard Co ...

  6. SpringMVC form 表单提交报400错误

    错误代码: HTTP Status 400 - type Status report message description The request sent by the client was sy ...

  7. i.mx6 Android5.1.1 build解析

    参考资料:理解 Android Build 系统 把总结放前面: 1. 常用编译命令 make clean 执行清理,等同于:rm -rf out/. make sdk 编译出 Android 的 S ...

  8. The "tsconfig.json" file must have compilerOptions.sourceMap set to true

    在编译ionic项目的时候出现:Error:The "tsconfig.json" file must have compilerOptions.sourceMap set to ...

  9. SQL Server中使用表值函数

    函数有很多限制,不能使用动态语句,不能使用临时表等等...细看一下,直接写语句就行了,不用动态语句 insert into @re select id,parid,@I from videoclass ...

  10. favi.icon是什么?

    各大网站都有属于自己的图标 概念解释: ico是Icon file的缩写,是Windows的图标文件格式的一种 1.制作ico格式的图片一个上传到服务器的根目录图片保存为favicon.ico 2.制 ...