安装python3及安装遇到的问题

这篇博客详细介绍了如何安装Python3,包括在安装过程中可能遇到的如gcc、zlib和libffi-devel缺失的问题,提供了相应的解决方案。此外,还讲述了如何建立Python3的软链接,并通过修改PATH环境变量确保其正常工作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 1、安装python3相关命令。 

mkdir -p /usr/local/python3
cd /usr/local/python3
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
tar -zxvf Python-3.7.2.tgz
cd Python-3.7.2
./configure --enable-optimizations    # bash ./configure --prefix=/usr/local/python3
make && make install

如果提示See `config.log' for more details,说明缺少gcc文件。

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.7... no
checking for python3... no
checking for python... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/python3/Python-3.7.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值