
5

centos7 安装python 3 - SegmentFault 思否
source link: https://segmentfault.com/a/1190000040396079
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

centos7 安装python 3
发布于 7 月 23 日
wget -c https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
- 解压到/usr/local/
- 依赖包安装
yum install libffi-devel
yum install openssl-devel
// 可能还有一些依赖的,我的环境之前已经安装过
// yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
cd Python-3.9.6/
mkdir /usr/local/python3
./configure -prefix=/usr/local/python3
make
make install
链接python3. pip3
ln -s /usr/local/python3/bin/python3.9 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3.9 /usr/bin/pip3
$ python3 --version Python 3.9.6 $ pip3 --version pip 21.1.3 from /usr/local/python3/lib/python3.9/site-packages/pip (python 3.9)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK