Centos7安装Python3.6
Centos7安装python安装依赖环境###yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel expat-devel gdbm-devel gcc make wget下载python3.6.10官方...
Centos7安装python
- 安装依赖环境
###
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel expat-devel gdbm-devel gcc make wget liblzma-dev
- 下载python3.6.10
官方下载地址:Download Python | Python.org
###
wget https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
下载后如图
- 将python解压到/usr/local/下,安装
###
tar -xf Python-3.6.10.tgz
cd Python-3.6.10/
./configure --prefix=/usr/local/python
make && make install
- 创建软链接到/usr/bin下
###
ln -s /usr/local/python/bin/python3 /usr/bin/python3
ln -s /usr/local/python/bin/pip3 /usr/bin/pip3
- 查看python安装是否成功(版本和使用)
###
python3 -v
pip3 -v
查看python与pip是否能使用
- 更新pip版本(备注,有时会出现超时,可以重试和使用其他源安装)
###
pip3 install --upgrade pip
更多推荐
所有评论(0)