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 解析标准的点击第三方文件管理器中的视频的intent
解析标准的第三方视频intent private List<String> mCurPlayList = new ArrayList<String>(); private in ...
- Android远程桌面助手(Build 0662)
ARDC Build 0662, Jul 19, 2017 OPT: 1440*2560及以下分辨率设备,帧速能稳定在20帧~25帧 FIX: 拖拽文件的路径中包含空格的处理 ADD: 支持Ctrl+ ...
- Java 8 的Lambda表达式
第一次看到用lambda表达式写出来的Java代码时,我对这种神秘的语法感到非常不理解,认为这样的Java搞得不可读.没有专门的去学习和认识,今天花了几个小时写了示例的练习后,我开心的看到了更清晰的J ...
- c/c++ 网络编程 UDP 主机网络信息取得
网络编程 UDP 主机网络信息取得 1,if_nametoindex 通过网卡名字取得网卡编号 2,if_indextoname 通过网卡编号取得网卡名字 #include <stdio.h&g ...
- LeetCode算法题-K-diff Pairs in an Array(Java实现)
这是悦乐书的第254次更新,第267篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第121题(顺位题号是532).给定一个整数数组和一个整数k,您需要找到数组中唯一的k- ...
- Scrapy案例01-爬取传智播客主页上的老师信息
目录 1. 新建scrapy项目 2. 爬虫文件: 2.1. 查看需要爬取内容存在哪里: 2.2. 设置item需要保存的数据变量 2.3. 创建爬虫文件 2.4. 保存数据 2.5. yield的用 ...
- 爬虫系列二(数据清洗--->xpath解析数据)
一 xpath介绍 XPath 是一门在 XML 文档中查找信息的语言.XPath 用于在 XML 文档中通过元素和属性进行导航. XPath 使用路径表达式在 XML 文档中进行导航 XPath 包 ...
- python项目在无外网的生产环境解决沙盒依赖问题
参考 https://yq.aliyun.com/articles/159599 https://www.jianshu.com/p/08c657bd34f1 缺点是 只能针对python的环境 做沙 ...
- jquery.amaran jquery提示类使用
<script src="ing/js/jquery-1.8.3.min.js"></script> <link rel="styleshe ...
- docker 常用命令和常用容器启动
docker:systemctl start docker # docker 启动systemctl stop docker # docker 停止systemctl restart docker # ...