Linux环境Python源码安装命令

# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
mkdir -p /home/datamining/hnq/python361

tar -zxvf Python-3.6.1.tgz
cd Python-3.6.1
# 一定要加上--with-ssl ,不然pip 报错
./configure --prefix=/home/datamining/hnq/python365 --with-ssl
make
make install    或者 make && make install
建立python3的软链
ln -s /usr/local/python3/bin/python3 /usr/bin/python365

查看链接:key是关键词可以是python或者pip
ls -l /usr/bin |grep {key}
删除旧的软连接:
rm -rf /usr/bin/{key}

 

参考 https://www.cnblogs.com/kimyeee/p/7250560.html

 

 

你可能感兴趣的:(Linux)