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 ...
随机推荐
- WEB开发常用软件集合
软件 dreamweaver cs6 http://www.cr173.com/soft/74348.html navicat http://pan.baidu.com/s/1b9nNzw subli ...
- string替换所有指定字符串(C++)
C++的string提供了replace方法来实现字符串的替换,但是对于将字符串中某个字符串全部替换这个功能,string并没有实现,我们今天来做的就是这件事. 首先明白一个概念,即string替换所 ...
- Linux中断(interrupt)子系统之三:中断流控处理层【转】
转自:http://blog.csdn.net/droidphone/article/details/7489756 1. 中断流控层简介 早期的内核版本中,几乎所有的中断都是由__do_IRQ函数 ...
- ntpdate时间同步
为什么需要网络同步时间: Linux服务器运行久时,系统时间就会存在一定的误差,一般情况下可以使用date命令进行时间设置,但在做数据库集群分片等操作时对多台机器的时间差是有要求的,此时就需要使用nt ...
- Mybatis 接口传入多个参数 xml怎么接收
mybatis 在接口上传入多个参数 1.如果传入的参数类型一样. Map<String, String> queryDkpayBindBankCidByOriBindAndBankCid ...
- Codeforces 219C Color Stripe(思维+字符串)
题目链接:http://codeforces.com/problemset/problem/219/C 题目大意: 给出一个字符串,只包含k种字符,问最少修改多少个字符(不增长新的种类)能够得到一个新 ...
- csu 1930 roads(DFS)
Description Once upon a time there was a strange kingdom, the kingdom had n cities which were connec ...
- GitLab备份的创建与恢复
使用Gitlab一键安装包安装Gitlab非常简单, 同样的备份恢复与迁移也非常简单. 使用一条命令即可创建完整的Gitlab备份: gitlab-rake gitlab:backup:create使 ...
- Luogu 1903 数颜色 | 分块
Luogu 1903 数颜色 | 分块 莫队不会啊-- 这道题直接分块也能卡过! 这道题的做法很有趣:对于每个位置i,记录它的颜色a[i]上一次出现的位置,记为pre[i]. 这样在查询一个区间[l, ...
- 深刻理解this的指向和var 定义的变量的问题
一般来说,在编程语言里我们常见的变量作用域就是词法作用域与动态作用域(Dynamic Scope),绝大部分的编程语言都是使用的词法作用域.词法作用域注重的是所谓的Write-Time,即编程时的上下 ...