码迷,mamicode.com
首页 > 编程语言 > 详细

linux下python3.6.7安装

时间:2021-06-03 18:13:34      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:request   oca   config   exec   sock   Fix   soc   linux   sts   

linux下python3.6.7安装
yum -y install gcc
yum -y install wget openssl openssl-devel

tar xvf Python-3.6.7.tgz

cd Python-3.6.7/

./configure --prefix=/usr/local/python3 --with-openssl

make

make install

将开头路径由python改为python2.7
vim /usr/bin/yum
vim /usr/libexec/urlgrabber-ext-down
vim /usr/bin/yum-config-manager

做软链接
mv /usr/bin/python /usr/bin/python_old
ln -sf /usr/local/python3/bin/python3 /usr/bin/python
ln -sf /usr/local/python3/bin/pip3 /usr/bin/pip
python -V
pip install requests
pip install sockets
pip install psutil

linux下python3.6.7安装

标签:request   oca   config   exec   sock   Fix   soc   linux   sts   

原文地址:https://www.cnblogs.com/liqing1009/p/14844831.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!