centos7虚拟机下python3安装matplotlib遇到的一些问题
1、安装位置
centos7虚拟机+python3.6
2、问题
2.1如果是使用的python2版本可以使用如下方式,
#yum search matplotlib
返回如下:
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.zju.edu.cn
* epel: mirrors.ustc.edu.cn
* extras: mirrors.cn99.com
* updates: mirrors.nju.edu.cn
=========================== N/S matched: matplotlib ============================
python-matplotlib-doc.x86_64 : Documentation files for python-matplotlib
python-matplotlib-qt4.x86_64 : Qt4 backend for python-matplotlib
python-matplotlib-tk.x86_64 : Tk backend for python-matplotlib
python-matplotlib.x86_64 : Python 2D plotting library
rootplot.x86_64 : Plots ROOT data with matplotlib
# yum install python-matplotlib.x86_64 -y
2.2在python3里,我使用pip3安装,但是总是报错
Could not fetch URL https://pypi.python.org/simple/matplotlib/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org',
port=443): Max retries exceeded with url: /simple/request/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))-
skipping
Could not find a version that satisfies the requirement request (from versions: ) No matching distribution found for matplotlib
没有找到解决办法,但找到替代方法。参考博客:https://www.cnblogs.com/kaid/p/7640816.html
pip3 install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
2.3安装相关联的包
安装相关联的包,我也不是很清楚,我从网上的教程上安装了许多,不确定哪些是需要的:
yum install freetype freetype-devel python-freetype
install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com(这个好像是必须的)2.4测试是否安装成功
import bz2
File "/usr/local/python3.6/lib/python3.6/bz2.py", line 22, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
2.5 成功后的效果

3、总结
只懂了linux 的基础命令,对于一些深度问题不能理解和解决,有待提高
centos7虚拟机下python3安装matplotlib遇到的一些问题的更多相关文章
- Linux系统centOS7在虚拟机下的安装及XShell软件的配置
前面的话 本文将详细介绍Linux系统centOS7在虚拟机下的安装 准备工作 [系统下载] 在安装centOS7之前,首先在官网下载合适的版本 然后,选择一个链接下载即可 [虚拟机配置] 接下来,需 ...
- centos7.2下编译安装&&使用-git代码库
centos7.2下编译安装git Git简介 Git是一个分布式版本控制系统 Git vs SVN SVN是典型的集中式版本控制起,版本库集中存放在服务器,当我们用自己的电脑干活儿的时候,需要先从中 ...
- centos7系统下nginx安装并配置开机自启动操作
准备工作 我的centos7系统是最小化安装的, 缺很多库, 首先安装必须的运行库 ? 1 2 3 4 5 6 7 8 9 10 11 yum install wget gcc gcc-c++ pcr ...
- Hyperledger fablic 1.0 在centos7环境下的安装与部署和动态增加节点
Hyperledger fablic 1.0 在centos7环境下的安装与部署和动态增加节点 一.安装docker 执行代码如下: curl -sSL https://get.daocloud.io ...
- ubuntu在虚拟机下的安装 ~~~ Hadoop的安装及配置 ~~~ Hdfs中eclipse的安装
前言 Hadoop是基于Java语言开发的,具有很好跨平台的特性.Hadoop的所要求系统环境适用于Windows,Linux,Mac系统,我们推荐选择使用Linux或Mac系统.而Linux系统则 ...
- 在python3.7下怎么安装matplotlib与numpy
一.安装matplotlib 1.在Matplotlib的官网下载电脑对应的版本,网址为:https://pypi.org/project/matplotlib/#files 2.将在下载的.whl文 ...
- Windows下python安装matplotlib
此文为转载,原文地址为:http://blog.csdn.net/u010585135/article/details/42127273 一.下载matplotlib安装包:网址http://matp ...
- 虚拟机下linux安装mysql,apache和php
由于腿伤了,卧床在家折腾下linux,尝试用虚拟机装mysql,apche和php.中间各种波折,装了好几天,觉得有些经验还是要记录下来,让自己别忘了:) 按照下面这篇文章的方法,基本可以顺利安装成功 ...
- docker学习------记录centos7.5下docker安装更换国内源的处理过程
一.centos7.5下更换阿里源 1.装好centos7.5镜像,将yum源更换为阿里源 第一步:刚出的centos7.5是解析不到阿里的东西的,所以找了台centos7.4,下载一些包 (1) 下 ...
随机推荐
- Android远程桌面助手(Build 0662)
ARDC Build 0662, Jul 19, 2017 OPT: 1440*2560及以下分辨率设备,帧速能稳定在20帧~25帧 FIX: 拖拽文件的路径中包含空格的处理 ADD: 支持Ctrl+ ...
- stereoscopic 3D
色分(Anaglyph)模式:典型的如红蓝立体,是利用红镜片只允许红光通过,蓝镜片只允许蓝光通过的原理,将两幅视差的图片(一张红色.一张蓝色)叠加构成一张立体图片 由于红蓝立体去掉了绿色分量,会导致最 ...
- MySQL常用字符串函数
字符串函数 是最常用的的一种函数,在一个具体应用中通常会综合几个甚至几类函数来实现相应的应用: 1.LOWER(column|str):将字符串参数值转换为全小写字母后返回 mysql> sel ...
- 虚拟机 与 host主机,无法ping通的问题
这个写的比较简单,先做以下记录 centos虚拟机安装到别的电脑上,因为linux中的程序需要向外有网络互通,所以需要重新设置ip 通过 ifconfig eth4 192.168.0.20 bro ...
- Bootstrap -- 文本,背景,其他样式
Bootstrap -- 文本,背景,其他样式 1. 文本样式:展示了不同的文本颜色 使用文本样式: <!DOCTYPE html> <html> <head> & ...
- SpringBoot使用注解实现事务管理
conttoller controller和普通的controller类一样, 不用改变 @RequestMapping(value = "/path/{id}", method ...
- 我的第一个python web开发框架(29)——定制ORM(五)
接下来我们要封装的是修改记录模块. 先上产品信息编辑接口代码 @put('/api/product/<id:int>/') def callback(id): ""&q ...
- IDEA包名显示设置
项目结构视图右上角那个齿轮 选择[Compact Empty Middle Packages],包会合并显示 [Hide Empty Middle Packages]去掉前面的√,不分层级显示
- c++中 . 和 -> 的区别是什么?
主要用于访问类的成员,->主要用于类类型的指针访问类的成员,而.运算符,主要用于类类型的对象访问类的成员. 例如: class A { public :int a } A ma; A *p=&a ...
- supervisord支持扩展(xml RPC API & Third Party Applications and Libraries)
XML-RPC API Documentation http://www.supervisord.org/api.html Third Party Applications and Libraries ...