centos 7 下安装Matplotlib

简介:

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# pip install matplotlib

Collecting matplotlib

  Using cached matplotlib-2.0.2-cp27-cp27mu-manylinux1_x86_64.whl

Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/lib/python2.7/site-packages (from matplotlib)

Requirement already satisfied: six>=1.10 in /usr/lib/python2.7/site-packages (from matplotlib)

Requirement already satisfied: pytz in /usr/lib/python2.7/site-packages (from matplotlib)

Requirement already satisfied: functools32 in /usr/lib/python2.7/site-packages (from matplotlib)

Requirement already satisfied: python-dateutil in /usr/lib/python2.7/site-packages (from matplotlib)

Requirement already satisfied: numpy>=1.7.1 in /usr/lib64/python2.7/site-packages (from matplotlib)

Requirement already satisfied: cycler>=0.10 in /usr/lib/python2.7/site-packages (from matplotlib)

Collecting subprocess32 (from matplotlib)

  Using cached subprocess32-3.2.7.tar.gz

Installing collected packages: subprocess32, matplotlib

  Running setup.py install for subprocess32 ... error

    Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lXGAiP/subprocess32/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-kqqBsj-record/install-record.txt --single-version-externally-managed --compile:

    running install

    running build

    running build_py

    creating build

    creating build/lib.linux-x86_64-2.7

    copying subprocess32.py -> build/lib.linux-x86_64-2.7

    running build_ext

    building '_posixsubprocess' extension

    creating build/temp.linux-x86_64-2.7

    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o

    _posixsubprocess.c:3:20: fatal error: Python.h: No such file or directory

     #include "Python.h"

                        ^

    compilation terminated.

    error: command 'gcc' failed with exit status 1

    

    ----------------------------------------

Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lXGAiP/subprocess32/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-kqqBsj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lXGAiP/subprocess32/

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# pip3 install matplotlib

bash: pip3: command not found...

Similar command is: 'pip'

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# yum install python3-pip

Loaded plugins: fastestmirror, langpacks

^[[ALoading mirror speeds from cached hostfile

 * base: centos.communilink.net

 * epel: repo.ugm.ac.id

 * extras: mirrors.btte.net

 * updates: centos.communilink.net

No package python3-pip available.

Error: Nothing to do

[root@localhost bin]# yum install pip3 

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: centos.communilink.net

 * epel: mirror.rise.ph

 * extras: mirrors.btte.net

 * updates: centos.communilink.net

No package pip3 available.

Error: Nothing to do

[root@localhost bin]# pip install pip3

Collecting pip3

  Could not find a version that satisfies the requirement pip3 (from versions: )

No matching distribution found for pip3

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# 

[root@localhost bin]# yum search pip

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: centos.communilink.net

 * epel: ftp.jaist.ac.jp

 * extras: mirrors.btte.net

 * updates: centos.communilink.net

====================================================== N/S matched: pip ======================================================

globus-xio-pipe-driver.x86_64 : Globus Toolkit - Globus Pipe Driver

globus-xio-pipe-driver-devel.x86_64 : Globus Toolkit - Globus Pipe Driver Development Files

libpipeline.i686 : A pipeline manipulation library

libpipeline.x86_64 : A pipeline manipulation library

libpipeline-devel.i686 : Header files and libraries for pipeline manipulation library

libpipeline-devel.x86_64 : Header files and libraries for pipeline manipulation library

nodejs-unpipe.noarch : Unpipe a stream from all destinations

pdns-backend-pipe.x86_64 : Pipe backend for pdns

perl-IO-Pipely.noarch : Portably create pipe() or pipe-like handles, one way or another

pipelight-selinux.noarch : SELinux-policy-module for pipelight

rubygem-apipie-bindings.noarch : The Ruby bindings for Apipie documented APIs

rubygem-apipie-bindings-doc.noarch : Documentation for rubygem-apipie-bindings

uwsgi-logger-pipe.x86_64 : uWSGI - logpipe logger plugin

vanessa_socket-pipe.x86_64 : Trivial TCP/IP pipe build using libvanessa_adt

aespipe.x86_64 : AES-based encryption tool for tar/cpio and loop-aes images

globus-xio-popen-driver.x86_64 : Globus Toolkit - Globus XIO Pipe Open Driver

globus-xio-popen-driver-devel.x86_64 : Globus Toolkit - Globus XIO Pipe Open Driver Development Files

nodejs-archy.noarch : Renders nested hierarchies with unicode pipes

nodejs-event-stream.noarch : Construct pipes of streams of events

nodejs-map-stream.noarch : Construct pipes of streams of events

nodejs-stream-combiner.noarch : Turn a pipeline into a single stream

nodejs-streamsink.noarch : Pipe to a buffer, then create readable streams from it

php-react-stream.noarch : Basic readable and writable stream interfaces that support piping

pv.x86_64 : A tool for monitoring the progress of data through a pipeline

python-apipkg.noarch : A Python namespace control and lazy-import mechanism

python-django-pipeline.noarch : An asset packaging library for Django

python-virtualenv-api.noarch : An API for virtualenv/pip

python2-pip.noarch : A tool for installing and managing Python 2 packages

python34-pip.noarch : A tool for installing and managing Python3 packages

vodovod.x86_64 : A pipe connecting game


  Name and summary matches only, use "search all" for everything.

[root@localhost bin]# yum install python34-pip

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: centos.communilink.net

 * epel: epel.scopesky.iq

 * extras: mirrors.btte.net

 * updates: centos.communilink.net

Resolving Dependencies

--> Running transaction check

---> Package python34-pip.noarch 0:8.1.2-5.el7 will be installed

--> Processing Dependency: python(abi) = 3.4 for package: python34-pip-8.1.2-5.el7.noarch

--> Processing Dependency: python34-setuptools for package: python34-pip-8.1.2-5.el7.noarch

--> Processing Dependency: /usr/bin/python3.4 for package: python34-pip-8.1.2-5.el7.noarch

--> Running transaction check

---> Package python34.x86_64 0:3.4.5-3.el7 will be installed

--> Processing Dependency: python34-libs(x86-64) = 3.4.5-3.el7 for package: python34-3.4.5-3.el7.x86_64

--> Processing Dependency: libpython3.4m.so.1.0()(64bit) for package: python34-3.4.5-3.el7.x86_64

---> Package python34-setuptools.noarch 0:19.2-3.el7 will be installed

--> Running transaction check

---> Package python34-libs.x86_64 0:3.4.5-3.el7 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


==============================================================================================================================

 Package                               Arch                     Version                          Repository              Size

==============================================================================================================================

Installing:

 python34-pip                          noarch                   8.1.2-5.el7                      epel                   1.7 M

Installing for dependencies:

 python34                              x86_64                   3.4.5-3.el7                      epel                    50 k

 python34-libs                         x86_64                   3.4.5-3.el7                      epel                   6.7 M

 python34-setuptools                   noarch                   19.2-3.el7                       epel                   373 k


Transaction Summary

==============================================================================================================================

Install  1 Package (+3 Dependent packages)


Total download size: 8.8 M

Installed size: 35 M

Is this ok [y/d/N]: y

Downloading packages:

(1/4): python34-3.4.5-3.el7.x86_64.rpm                                                                 |  50 kB  00:00:04     

(2/4): python34-libs-3.4.5-3.el7.x86_64.rpm                                                            | 6.7 MB  00:01:03     

(3/4): python34-setuptools-19.2-3.el7.noarch.rpm                                                       | 373 kB  00:00:05     

(4/4): python34-pip-8.1.2-5.el7.noarch.rpm                                                             | 1.7 MB  00:00:11     

------------------------------------------------------------------------------------------------------------------------------

Total                                                                                         114 kB/s | 8.8 MB  00:01:19     

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : python34-3.4.5-3.el7.x86_64                                                                                1/4 

  Installing : python34-libs-3.4.5-3.el7.x86_64                                                                           2/4 

  Installing : python34-setuptools-19.2-3.el7.noarch                                                                      3/4 

  Installing : python34-pip-8.1.2-5.el7.noarch                                                                            4/4 

  Verifying  : python34-setuptools-19.2-3.el7.noarch                                                                      1/4 

  Verifying  : python34-pip-8.1.2-5.el7.noarch                                                                            2/4 

  Verifying  : python34-libs-3.4.5-3.el7.x86_64                                                                           3/4 

  Verifying  : python34-3.4.5-3.el7.x86_64                                                                                4/4 


Installed:

  python34-pip.noarch 0:8.1.2-5.el7                                                                                           


Dependency Installed:

  python34.x86_64 0:3.4.5-3.el7       python34-libs.x86_64 0:3.4.5-3.el7       python34-setuptools.noarch 0:19.2-3.el7      


Complete!

[root@localhost bin]# yum install python34-setuptools

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: centos.communilink.net

 * epel: epel.scopesky.iq

 * extras: mirrors.btte.net

 * updates: centos.communilink.net

Package python34-setuptools-19.2-3.el7.noarch already installed and latest version

Nothing to do

[root@localhost bin]# easy_install-3.4 pip

Searching for pip

Best match: pip 8.1.2

Adding pip 8.1.2 to easy-install.pth file

Installing pip3.4 script to /usr/bin

Installing pip script to /usr/bin

Installing pip3 script to /usr/bin


Using /usr/lib/python3.4/site-packages

Processing dependencies for pip

Finished processing dependencies for pip

[root@localhost bin]# yum search easy_install

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: centos.communilink.net

 * epel: kartolo.sby.datautama.net.id

 * extras: mirrors.btte.net

 * updates: centos.communilink.net

=================================================== Matched: easy_install ====================================================

python-XStatic-Angular.noarch : Angular 1.2.1 (XStatic packaging standard)

python-XStatic-Angular-Bootstrap.noarch : Angular-Bootstrap (XStatic packaging standard)

python-XStatic-Angular-Cookies.noarch : Angular-Cookies (XStatic packaging standard)

python-XStatic-Angular-Mock.noarch : Angular-Mock (XStatic packaging standard)

python-XStatic-Angular-lrdragndrop.noarch : Angular-lrdragndrop (XStatic packaging standard)

python-XStatic-Bootstrap-Datepicker.noarch : Bootstrap-Datepicker (XStatic packaging standard)

python-XStatic-Bootstrap-SCSS.noarch : Bootstrap-SCSS (XStatic packaging standard)

python-XStatic-D3.noarch : D3 (XStatic packaging standard)

python-XStatic-Font-Awesome.noarch : Font-Awesome (XStatic packaging standard)

python-XStatic-Hogan.noarch : Hogan (XStatic packaging standard)

python-XStatic-JQuery-Migrate.noarch : JQuery-Migrate (XStatic packaging standard)

python-XStatic-JQuery-TableSorter.noarch : JQuery-TableSorter (XStatic packaging standard)

python-XStatic-JQuery-quicksearch.noarch : JQuery-quicksearch (XStatic packaging standard)

python-XStatic-JSEncrypt.noarch : JSEncrypt (XStatic packaging standard)

python-XStatic-Jasmine.noarch : Jasmine (XStatic packaging standard)

python-XStatic-QUnit.noarch : QUnit (XStatic packaging standard)

python-XStatic-Rickshaw.noarch : Rickshaw (XStatic packaging standard)

python-XStatic-Spin.noarch : Spin (XStatic packaging standard)

python-XStatic-jQuery.noarch : jQuery 1.10.2 (XStatic packaging standard)

python-XStatic-jquery-ui.noarch : jquery-ui (XStatic packaging standard)

python-XStatic-smart-table.noarch : smart-table (XStatic packaging standard)

python-XStatic-termjs.noarch : term.js (XStatic packaging standard)

python2-XStatic-roboto-fontface.noarch : roboto-fontface (XStatic packaging standard)

python2-pip.noarch : A tool for installing and managing Python 2 packages

python34-pip.noarch : A tool for installing and managing Python3 packages

[root@localhost bin]# pip install freetype-py

Collecting freetype-py

  Using cached freetype-py-1.0.2.tar.gz

Installing collected packages: freetype-py

  Running setup.py install for freetype-py ... done

Successfully installed freetype-py-1.0.2

You are using pip version 8.1.2, however version 9.0.1 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

[root@localhost bin]# pip install --upgrade pip

Collecting pip

  Using cached pip-9.0.1-py2.py3-none-any.whl

Installing collected packages: pip

  Found existing installation: pip 8.1.2

    Uninstalling pip-8.1.2:

      Successfully uninstalled pip-8.1.2

Successfully installed pip-9.0.1

[root@localhost bin]# 

[root@localhost bin]# pip isntall pypng

ERROR: unknown command "isntall" - maybe you meant "install"

[root@localhost bin]# pip install pypng

Collecting pypng

  Using cached pypng-0.0.18.tar.gz

Installing collected packages: pypng

  Running setup.py install for pypng ... done

Successfully installed pypng-0.0.18

[root@localhost bin]# pip install matplotlib

Collecting matplotlib

  Downloading matplotlib-2.0.2-cp34-cp34m-manylinux1_x86_64.whl (14.6MB)

    100% |████████████████████████████████| 14.6MB 63kB/s 

Collecting numpy>=1.7.1 (from matplotlib)

  Downloading numpy-1.12.1-cp34-cp34m-manylinux1_x86_64.whl (16.8MB)

    100% |████████████████████████████████| 16.8MB 55kB/s 

Collecting python-dateutil (from matplotlib)

  Using cached python_dateutil-2.6.0-py2.py3-none-any.whl

Collecting pytz (from matplotlib)

  Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)

    100% |████████████████████████████████| 491kB 359kB/s 

Collecting cycler>=0.10 (from matplotlib)

  Using cached cycler-0.10.0-py2.py3-none-any.whl

Collecting pyparsing!=2.0.0,!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 (from matplotlib)

  Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)

    100% |████████████████████████████████| 61kB 475kB/s 

Collecting six>=1.10 (from matplotlib)

  Using cached six-1.10.0-py2.py3-none-any.whl

Installing collected packages: numpy, six, python-dateutil, pytz, cycler, pyparsing, matplotlib

Successfully installed cycler-0.10.0 matplotlib-2.0.2 numpy-1.12.1 pyparsing-2.2.0 python-dateutil-2.6.0 pytz-2017.2 six-1.10.0

[root@localhost bin]# 










本文转自 帅枫小明 51CTO博客,原文链接:http://blog.51cto.com/576642026/1928162,如需转载请自行联系原作者
目录
相关文章
|
存储 Ubuntu Linux
VMware-安装CentOS系统教程及安装包
虚拟机相当于是一个独立于你电脑的环境,在这个环境上面,你可以安装Linux、Windows、Ubuntu等各个类型各个版本的系统,在这个系统里面你不用担心有病读等,不用担心文件误删导致系统崩溃。 虚拟机也和正常的电脑系统是一样的,也可以开关机,不用的时候,你关机就可以了,也不会占用你的系统资源,使用起来还是比较方便 这里也有已经做好的CentOS 7系统,下载下来解压后直接用VMware打开就可以使用
1921 69
|
存储 分布式计算 Linux
安装篇--CentOS 7 虚拟机安装
VMware 装 CentOS 7 不知道从哪下手?这篇超详细图文教程手把手教你在 VMware Workstation 中完成 CentOS 7 桌面系统的完整安装流程。从 ISO 镜像下载、虚拟机配置,到安装图形界面、设置用户密码,每一步都有截图讲解,适合零基础新手快速上手。装好之后无论你是要搭 Hadoop 集群,还是练 Linux ,这个环境都够你折腾一整天!
4899 3
|
Ubuntu Linux 索引
Centos 7、Debian及Ubuntu系统中安装和验证tree命令的指南。
通过上述步骤,我们可以在CentOS 7、Debian和Ubuntu系统中安装并验证 `tree`命令。在命令行界面中执行安装命令,然后通过版本检查确认安装成功。这保证了在多个平台上 `tree`命令的一致性和可用性,使得用户无论在哪种Linux发行版上都能使用此工具浏览目录结构。
1243 78
|
Linux 网络安全 Apache
针对在Centos/Linux安装Apache过程中出现的常见问题集锦
以上每个问题的解决方案应深入分析错误日志、系统消息和各种配置文件,以找到根本原因并加以解决。务必保持系统和Apache软件包更新到最新版本,以修复已知的bugs和安全漏洞。安装和管理Web服务器是一项需要细致关注和不断学习的任务。随着技术的发展,推荐定期查看官方文档和社区论坛,以保持知识的更新。
556 80
|
安全 关系型数据库 MySQL
CentOS 7 yum 安装 MySQL教程
在CentOS 7上安装MySQL 8,其实流程很清晰。首先通过官方Yum仓库来安装服务,然后启动并设为开机自启。最重要的环节是首次安全设置:需要先从日志里找到临时密码来登录,再修改成你自己的密码,并为远程连接创建用户和授权。最后,也别忘了在服务器防火墙上放行3306端口,这样远程才能连上。
2942 16
|
存储 关系型数据库 MySQL
在CentOS 8.x上安装Percona Xtrabackup工具备份MySQL数据步骤。
以上就是在CentOS8.x上通过Perconaxtabbackup工具对Mysql进行高效率、高可靠性、无锁定影响地实现在线快速全量及增加式数据库资料保存与恢复流程。通过以上流程可以有效地将Mysql相关资料按需求完成定期或不定期地保存与灾难恢复需求。
984 10
|
机器人 Linux
CentOS 7系统中安装特定版本CMake 3.21.2的方法。
到这里,过程已经全部完成。如果你跟随上面的步骤来,那么你现在已经拥有了一个全新的CMake版本在你的CentOS 7系统上了。这个过程就像是你通过一系列仪式,唤醒了一个沉睡已久的古老机器人,它现在完全按照你的意愿来帮你构建和编译软件了。
916 18
|
人工智能 数据挖掘 Linux
Centos安装Python3.7(亲测可用)
本指南详细介绍了在基于Linux(以CentOS系统为例,使用yum包管理器)的系统上安装Python 3.7版本的完整流程。Python是一种广泛使用的高级编程语言,在各种领域如软件开发、数据分析、人工智能和区块链开发等都有着重要的应用。
1031 2
|
安全 Linux
安装EPEL Repository Centos 7.9
记住,行走在Linux的世界,把“学习”作为你不可或缺的随身宝典。今天你学会了如何将EPEL这座外来的宝库接入你的系统,明天,你或许就能在这座宝库中发现一款能领你走向Linux大师之路的神器。
939 5
|
Kubernetes Linux 开发者
在CentOS 7.8上使用kubeadm安装k8s 1.26
至此,你已经在CentOS 7.8上使用kubeadm成功安装了k8s 1.26。你可以通过输入 `kubectl get nodes`来查看节点状态,如果显示为Ready,那么恭喜你,你的Kubernetes集群已经准备好了。
517 23