CentOS 6.8 安装 Python3
由于没有GCC无法编译安装Python3.6, 所以先安装GCC(yum install gcc)
下载地址:https://www.python.org/ftp/python/
1 tar zxvf Python-3.5.2.tgz
2 cd Python-3.5.2
3 ./configure --prefix=/usr/local/python35
4 make && make install
然后安装pip3,然后用pip3安装包的时候遇到:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
解决办法:
# rpm -aq|grep openssl
1). yum install openssl-devel -y
yum install openssl
yum libssl-dev
2).
#修改Setup文件
vi /usr/software/Python-2.7.5/Modules/Setup
#修改结果如下:
# Socket module helper for socket(2)
_socket socketmodule.c timemodule.c
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
#SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
3). 重新编译安装Python3
./configure --enable-optimizations
make altinstall
4). 可以正常用pip3安装包了。
|
I ran into the same error when building Python 3.6.1 from source under CentOS 7. For CentOS7, I had to first:
Then:
Now |
refer: https://stackoverflow.com/questions/41489439/pip3-installs-inside-virtual-environment-with-python3-6-failing-due-to-ssl-modul
如果您认为这篇文章还不错或者有所收获,您可以通过右边的“打赏”功能 打赏我一杯咖啡【物质支持】,也可以点击下方的【好文要顶】按钮【精神支持】,因为这两种支持都是使我继续写作、分享的最大动力!
CentOS 6.8 安装 Python3的更多相关文章
- CentOS系统下安装python3+Django
转载:CentOS系统下安装python3+Django 1.首先用yum安装下vim,因为CentOS 7可能根本没自带完整vim,经常出现输入乱码:yum -y install vim 2.安装开 ...
- CentOS 7下安装Python3.6
CentOS 7下安装Python3.6.4 CentOS 7下安装Python3.5 •安装python3.6可能使用的依赖 yum install openssl-devel bzip2-de ...
- CentOS 7下安装Python3.6.4
CentOS 7下安装Python3.5 •安装python3.6可能使用的依赖 yum install openssl-devel bzip2-devel expat-devel gdbm-deve ...
- CentOS 7下安装Python3.5
CentOS 7下安装Python3.5 •安装python3.5可能使用的依赖 yum install openssl-devel bzip2-devel expat-devel gdbm-deve ...
- ESRally压测ElasticSearch性能 CentOS 7.5 安装 Python3.7
1,CentOS 7.5 安装 Python3.7 1.安装开发者工具 yum -y groupinstall "Development Tools"2.安装Python编译依赖包 ...
- Centos 6.5 安装python3.6
废话不多说,直接上步骤 wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2rc1.tgz 进入 https://www.python.o ...
- Centos 6.5 安装 python3.6.2、pip9.0.1、ipython6.1
说明:由于Cenots 6.5 默认是安装的 python 2.6.6 要想同一台主机使用多个python版本,不能影响原来的版本,因为系统很多还依赖于python,比如 yum python ...
- 1.在CentOS 6.4安装python3
CentOS安装Python3.X 1.系统环境说明 [root@Python ~]# uname -r 2.6.32-431.el6.i686 [root@Python ~]# uname -m i ...
- CentOS源码安装Python3.6
一.安装环境及版本 CentOS 6.5 Python 3.6.1 二.安装依赖包 1.安装静态库 # yum install -y openssl-static 注:如果不安装该静态库,会导致pyt ...
随机推荐
- centos7.2 安装 composer
安装Composer https://pkg.phpcomposer.com/#how-to-install-composer # 下载composer.phar curl -sS https:// ...
- 2016最新的中国省市区三级数据库表.sql mssql
/****** Object: Table [dbo].[t_Area] Script Date: 09/10/2016 09:35:46 ******/ SET ANSI_NULLS ON GO S ...
- LOJ 2249: 洛谷 P2305: 「NOI2014」购票
题目传送门:LOJ #2249. 题意简述: 有一棵以 \(1\) 号节点为根节点的带边权的树. 除了 \(1\) 号节点的所有节点上都有人需要坐车到达 \(1\) 号节点. 除了 \(1\) 号节点 ...
- Linux Core Dump【转】
转自:http://www.cnblogs.com/hazir/p/linxu_core_dump.html 当程序运行的过程中异常终止或崩溃,操作系统会将程序当时的内存状态记录下来,保存在一个文件中 ...
- Eclipse的git插件冲突合并方法
Eclipse有一个git的插件叫EGit,用于实现本地代码和远程代码对比.合并以及提交.但是在本地代码和远程代码有冲突的时候,EGit的处理方案还是有点复杂.今天就彻底把这些步骤给理清楚,并公开让一 ...
- 钉钉机器人-实现监控通知功能-python
1. 首先得创建有 一个 钉钉群.(因为只能发群通知) 2. 添加机器人,得到一个url: 3. 开始写Python脚本: # -*- coding: utf-8 -*- ""&q ...
- Kaggle大数据竞赛平台入门
Kaggle大数据竞赛平台入门 大数据竞赛平台,国内主要是天池大数据竞赛和DataCastle,国外主要就是Kaggle.Kaggle是一个数据挖掘的竞赛平台,网站为:https://www.kagg ...
- 抓包获取百度音乐API
这次抓包是获取手机APP中的数据包,共分为三个部分: 1.win7建立wifi 2.PC架设代理服务器 手机设置代理 3.抓包分析 一.win7建立wifi 在win7下搭建wifi非常简单,网上的教 ...
- Java基础92 MySQL插入当前系统时间
1.时间格式 用yyyy表示年份(year). -- y 表示年的最后一位,yy 表示年的最后2位,yyy 表示年的最后3位,yyyy 用4位数表示年用MM表示月份(month).-- mm 用2位 ...
- shell学习(三)
libvirt用于管理KVM本身的工具 virt-install用于安装虚拟机需要的安装包,安装虚拟机 virt-mananger:管理创建删除虚拟机的工具 ---恢复内容开始--- 1 gre ...