Linux安装Python 3.5.2
安装依赖的库
yum -y install Python-devel openssl openssl-devel gcc sqlite sqlite-devel mysql-devel libxml2-devel libxslt-devel
Python =================================================
下载python 3.5.2
解压文件
tar -xzf Python-3.5.2.tgz
进入目录
cd Python-3.5.2
编译安装
./configure --prefix=/usr/local/python3.5 --with-threads --enable-shared make && make altinstall
备份旧python相关命令
mv /usr/bin/pip /usr/bin/pip_old mv /usr/bin/easy_install /usr/bin/easy_install_old mv /usr/bin/python /usr/bin/python_old
新版本python命令做软连接,快捷使用
ln -s /usr/local/python3.5/lib/libpython3.5m.so /usr/lib ln -s /usr/local/python3.5/lib/libpython3.5m.so.1.0 /usr/lib ln -s /usr/local/python3.5/lib/libpython3.5m.so /usr/lib64 ln -s /usr/local/python3.5/lib/libpython3.5m.so.1.0 /usr/lib64 ln -s /usr/local/python3.5/bin/python3.5 /usr/bin/python ln -s /usr/local/python3.5/bin/easy_install-3.5 /usr/bin/easy_install ln -s /usr/local/python3.5/bin/pip3.5 /usr/bin/pip
重新加载配置
/sbin/ldconfig -v
尽情使用吧~~!
本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-10/147579.htm
相关推荐
以梦为马不负韶华 2020-10-20
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20