首先安装依赖包,依赖包缺一不可,笔者曾安装python3未成功就是因为没有安装libffi-develsudo yum -y groupinstall Development toolssudo yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel s...
首先安装依赖包,依赖包缺一不可,笔者曾安装python3未成功就是因为没有安装libffi-devel
sudo yum -y groupinstall "Development tools"
sudo 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 libffi-devel
然后获取python3.7的安装包
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
解压
cd ~/Download
tar -xzvf Python-3.7.0.tar.xz
配置python3的安装目录并安装
cd Python-3.7.0
./configure
sudo make
sudo make install
查看软链接,没有创建
ln -s /usr/local/bin/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/bin/python3/bin/pip3 /usr/bin/pip3
最后在命令行中输入python3,能够进入python3终端即成功安装
沃梦达教程
本文标题为:Python 3.7 安装 Centos
猜你喜欢
- Python实现将DNA序列存储为tfr文件并读取流程介绍 2022-10-20
- CentOS7 安装 Python3.6 2023-09-04
- Python之路-Python中的线程与进程 2023-09-04
- python线程池ThreadPoolExecutor与进程池ProcessPoolExecutor 2023-09-04
- 在centos6.4下安装python3.5 2023-09-04
- Python Pandas如何获取和修改任意位置的值(at,iat,loc,iloc) 2023-08-04
- windows安装python2.7.12和pycharm2018教程 2023-09-03
- python中defaultdict用法实例详解 2022-10-20
- Python 保存数据的方法(4种方法) 2023-09-04
- python中列表添加元素的几种方式(+、append()、ext 2022-09-02