linux安装版本的python,linux安装python各种版本.md

### 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'的解决方案

![image-20200805134326735](%E5%9B%BE%E7%89%87/image-20200805134326735.png)

yum install libffi-devel -y

------

![img](%E5%9B%BE%E7%89%87/u=228401719,2819682736&fm=173&s=6B62DC4FDC31049CF7B061B80300D012&w=640&h=360&img.JPEG)

### 问题2

zipimport.ZipImportError: can't decompress data; zlib not available

```

yum -y install zlib*

```

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值