1. 程式人生 > >CentOS6.9安裝python3.7

CentOS6.9安裝python3.7

楔子

CentOS6.9升級python3.7

安裝

1 依賴環境

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

2 注意

centos下安裝python3.7.0以上版本時報錯ModuleNotFoundError: No module named '_ctypes’的解決辦法

yum install
libffi-devel -y

3 下載安裝

wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz

## 解壓進入目錄
./configure 
make 
make install


在這裡插入圖片描述

如上圖所示,pip自動安裝

pip安裝mycli

提示require TLS/SSL

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip'
command.

在這裡插入圖片描述

沒事動yum 和pip