安装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可制作的各种图表,地址:http://matplotlib.org/
安装matplotlib的更多相关文章
- uwsgi+flask环境中安装matplotlib
uwsgi+flask的python有自身的virtual environment,可以通过如下命令进入 . venv/bin/activate 虽然通过sudo apt-get install py ...
- Python 安装matplotlib,six,dateutil,pyparsing 完整过程
[摘要:正在做词频剖析的时间,须要用matlotlib 做图表,柱状图啥的,因而便最先了一个又一个的装置库的进程 由于matplotlib 须要依附很多其他科教盘算的第三圆库,须要一个一个的装置了.. ...
- ubuntu安装matplotlib一些坑
ubuntu16.04,python2.7 安装matplotlib, 1.在root权限下执行命令 pip install matplotlib==1.5.1 这里有个困扰我一个星期的问题,系统都被 ...
- Ubuntu10.04 python2.6下安装matplotlib环境
一.准备工作1.sudo apt-get install python-numpy2.sudo apt-get install python2.6-dev3.sudo apt-get install ...
- Ubuntu 安装 matplotlib
参考: ubuntu16 安装matplotlib Ubuntu 安装 matplotlib sudo apt-get install libpng-dev libfreetype6-dev pkg- ...
- ubuntu16 安装matplotlib
在安装ubuntu安装matplotlib时碰到不少问题,简单做个备忘: 需要先安装其依赖的包libpng和freetype 安装libpng: sudo apt-get install libpng ...
- 为python安装matplotlib模块
matplotlib是python中强大的画图模块. 首先确保已经安装python,然后用pip来安装matplotlib模块. 进入到cmd窗口下,执行python -m pip install - ...
- Python3.x(windows系统)安装matplotlib库
Python3.x(windows系统)安装matplotlib库 cmd命令: pip install matplotlib 执行结果:
- 在tensorflow环境下安装matplotlib
在运行程序时,报错ImportError: No module named 'matplotlib',如图.经网上查询发现是没有安装matplotlib 因此记录一下在tensorflow环境下安装m ...
随机推荐
- Python -- Windows编程 -- 注册表
1.查询开机自启项 startUp.py import re import win32api, win32con def GetValues(fullname): #分割出基本项name[0] nam ...
- javascript 数组去重的6种思路
前端在日常开发中或多或少都会碰到有对数据去重的需求,实际上,像是lodash这些工具库已经有成熟完备的实现,并且可以成熟地运用于生产环境.但是这并不妨碍我们从思维拓展的角度出发,看看去重可以用几种思路 ...
- 使用DAO模式开发宠物管理系统---hellokitty
宠物有狗和企鹅. 狗的属性有:编号.名称.亲密值.健康值.品种.所属主人编号. 企鹅的属性有:编号.名称.亲密值.健康值.性别.所属主人编号. 该系统中主人可以领养宠物,主人的属性有:编号.用户名.密 ...
- Object类上的方法
1.getClass: public final native Class<?> getClass(); 返回当前对象运行时的类的对象. 2.hashCode: public native ...
- 利用反射,批量启动WCF服务
对于WCF的宿主启动来说,有好多方法,单独启动也很简单,可以根据业务需要来自由选择(单独启动方法这里就不做解释) 对于业务服务比较多的时候,往往需要多个服务来承载系统,但是如果将服务启动单独写代码启动 ...
- rabbitmq-channel方法介绍
先介绍rabbmitmq的几个方法: // 声明一个队列 -// queue 队列名称 // durable 为true时server重启队列不会消失 (是否持久化) // exclusive 队列是 ...
- wcf读写cookie
一般来说,web应用的服务端(aspx或mvc的action)调用wcf时,是一个服务与服务的通讯,而不是客户端(浏览器)与服务器的通讯. 这种情况下,如果要在wcf端处理客户端的cookie,就需要 ...
- 解决:java 读取 resources 下面的 json 文件
前言:java 读取 工程下的配置文件,文件类型为 json(*.json),记录一下始终读取不到 json 文件的坑.maven项目 直接上工具类代码 package com.yule.compon ...
- QT的信号和槽机制简介
信号与槽作为QT的核心机制在QT编程中有着广泛的应用,本文介绍了信号与槽的一些基本概念.元对象工具以及在实际使用过程中应注意的一些问题. QT是一个跨平台的C++ GUI应用构架,它提供了丰富的窗口部 ...
- Hive Metastore 连接报错
背景 项目中需要通过一些自定义的组件来操控hive的元数据,于是使用了remote方式来存储hive元数据,使用一个服务后台作为gateway,由它来控制hive元数据. 现象 在windows上连接 ...