安装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 ...
随机推荐
- golang-利用反射给结构体赋值
由于想给一个结构体的部分成员赋值,但是有不知道具体名字,故将tag的json名字作为索引,按照json名字来一一赋值 1.通过tag反射//将结构体里的成员按照json名字来赋值 func SetSt ...
- mysql预编译
一.背景: 用Mybatis+mysql的架构做开发,大家都知道,Mybatis内置参数,形如#{xxx}的,均采用了sql预编译的形式,举例如下: <select id=”aaa” param ...
- 五个步骤教你理清Redis与Memcached的区别
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由Super发表于云+社区专栏 memcached和redis,作为近些年最常用的缓存服务器,相信大家对它们再熟悉不过了.前两年还在学校 ...
- JavaScript函数——预编译
四部曲 创建AO对象 找形参和变量声明,将变量和形参名作为AO属性名,值为undefined. 将实参值和形参值统一 在函数体内找函数声明,值赋予函数体. 权重按顺序依次增加.以下例子即可体现上述规则 ...
- Action Bar
1.显示隐藏Action Bar 1.配置上 在application 上的 android:theme="@style/AppTheme"全局配置ActionBar在某个acti ...
- [日常] nginx访问频率限制
去年的事,随便记记 ========================================================================= 2017年3月15日 记录: n ...
- 一次单核CPU占用过高问题的处理
客户现场反馈,top的检查结果中,一个CPU的占用一直是100%.实际上现场有4个CPU,而且这个服务器是mysql专属服务器. 我的第一反应是io_thread一类的参数设置有问题,检查以后发现re ...
- 【原】Maven解决Jar包冲突
一.起源 引入二方jar maven 包后出现 NoSuchMethodError org.apache.commons.lang3.StringUtils.isNoneEmpty . 第一感觉就是j ...
- Linux的虚拟内存管理-如何分配和释放内存,以提高服务器在高并发情况下的性能,从而降低了系统的负载
Linux的虚拟内存管理有几个关键概念: Linux 虚拟地址空间如何分布?malloc和free是如何分配和释放内存?如何查看堆内内存的碎片情况?既然堆内内存brk和sbrk不能直接释放,为什么不全 ...
- linux总结之find搜索文件(times 3)
个人原创,转自请在文章头部显眼位置注明出处:https://www.cnblogs.com/sunshine5683/p/10091341.html find命令的各种搜索 一.根据文件名进行查找 命 ...