Python 官方文档:入门教程 => 点击学习
Centos7下安装python3.7 首先安装依赖包,centos里面是-devel,如果在ubuntu下安装则要改成-dev,依赖包缺一不可,笔者曾安装python3未成功就是因为没有安装libffi-deve sudo yum -y
首先安装依赖包,centos里面是-devel,如果在ubuntu下安装则要改成-dev,依赖包缺一不可,笔者曾安装python3未成功就是因为没有安装libffi-deve
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.0a1.tar.xz
解压
cd ~/Download
tar -xvJf Python-3.7.0a1.tar.xz
配置python3的安装目录并安装
cd Python-3.7.0a1
./configure --preix=/usr/local/bin/python3
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终端即成功安装
转载链接:Https://blog.csdn.net/elija940818/article/details/79238813
--结束END--
本文标题: Centos7下安装Python3.7
本文链接: https://lsjlt.com/news/187916.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0