聯(lián)網(wǎng)環(huán)境下編譯安裝python3.7.2,不聯(lián)網(wǎng)則需要配置cnetos7.9離線源
下載解壓軟件包
[root@localhost ~]# tar -xf Python-3.7.3.tar.gz
[root@localhost ~]# ls
anaconda-ks.cfg Python-3.7.3 Python-3.7.3.tar.gz
[root@localhost ~]#
[root@localhost ~]# cd Python-3.7.3
[root@localhost Python-3.7.3]# ls
aclocal.m4 config.sub Doc install-sh m4 Misc Parser Programs README.rst
CODE_OF_CONDUCT.rst configure Grammar Lib Mac Modules PC pyconfig.h.in setup.py
config.guess configure.ac Include LICENSE Makefile.pre.in Objects PCbuild Python Tools
[root@localhost Python-3.7.3]#
安裝依賴
[root@localhost Python-3.7.3]# yum install -y zlib zlib-devel gcc libffi libffi-devel
編譯安裝文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-740474.html
[root@localhost Python-3.7.3]# ./configure
[root@localhost Python-3.7.3]# make
[root@localhost Python-3.7.3]# make install
驗(yàn)證文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-740474.html
[root@localhost Python-3.7.3]# python3 --version
Python 3.7.3
[root@localhost Python-3.7.3]# python3
Python 3.7.3 (default, Nov 2 2023, 10:28:15)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
到了這里,關(guān)于centos7.9編譯安裝python3.7.2的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!