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

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

### 問題2
zipimport.ZipImportError: can't decompress data; zlib not available
```
yum -y install zlib*
```
一鍵復制
編輯
Web IDE
原始數據
按行查看
歷史
總結
以上是生活随笔為你收集整理的linux安装版本的python,linux安装python各种版本.md的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: stm32 SPI架构
- 下一篇: Java字段和属性