### linux安装python各种版本
PS:首先按照本文的问题按照教程解决,再安装编译python
[python各个版本大全](https://www.python.org/ftp/python/)
```bash
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz #下载
tar xJf Python-3.7.0.tar.xz #解压
$ cd Python-3.7.0/
$ ./configure --with-ssl# 配置openssl
$ make
$ make install
which python3.7 #查看位置
>>>/usr/local/bin/python3.7
```
### 问题1
linux环境python3出现pip is configured with locations that require TLS/SSL, however the..不可用的解决方法
首先明确问题出现原因,是因为openssl版本过低或者不存在
查看openssl安装包,发现缺少openssl-devel包
```
rpm -aq|grep openssl
```
openssl-0.9.8e-20.el5
openssl-0.9.8e-20.el5
yum安装openssl-devel
```
yum install openssl-devel -y
```
查看安装结果
```
rpm -aq|grep openssl
```
openssl-0.9.8e-26.el5_9.1
openssl-0.9.8e-26.el5_9.1
openssl-devel-0.9.8e-26.el5_9.1
openssl-devel-0.9.8e-26.el5_9.1
重新对python3.6进行编译安装,用以下过程来实现编译安装:
```
cd Python-3.6.4
./configure --with-ssl
make
sudo make install
```
------
### 问题3
ModuleNotFoundError: No module named '_ctypes'的解决方案

yum install libffi-devel -y
------

### 问题2
zipimport.ZipImportError: can't decompress data; zlib not available
```
yum -y install zlib*
```
一键复制
编辑
Web IDE
原始数据
按行查看
历史