centos7安装Python3

2019-05-18 13:46:57       xhs
wget下载最新的Python包,比如3.7
解压
安装依赖
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel libffi-devel
cd Python-3.7.3
./configure --prefix=/usr/local/python37
make
make install

 ln -s /usr/local/python37/bin/python3.7 /usr/bin/python3
ln -s /usr/local/python37/bin/pip3 /usr/bin/pip3

参考
https://www.cnblogs.com/progor/p/8445694.html
https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul

发表评论