CentOS6安装Pyhon3
Posted warren
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS6安装Pyhon3相关的知识,希望对你有一定的参考价值。
一,从官方下载Python3.6
[[email protected] src]# pwd /usr/local/src [[email protected]-node1 src]# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
二,解压并安装
[[email protected] src]#tar xvzf Python-3.6.1.tgz [[email protected]-node1 src]#cd Python-3.6.1/ [[email protected]-node1 Python-3.6.1]#./configure --prefix=/user/local/python3.6 [[email protected]-node1 Python-3.6.1]#make && make install
三,建立Python3.6软连接,方便执行程序
ln -s /usr/local/python3.6/bin/python3 /usr/bin/python3
四,检查安装师傅成功
[[email protected] ~]# python3 Python 3.6.1 (default, Dec 5 2017, 14:59:11) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
五,安装pip9.0并建立软连接
wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9 tar zxf pip-9.0.1.tar.gz cd pip-9.0.1 python3 setup.py install ln -s /usr/local/python3.6/bin/pip3 /usr/bin/pip
六,通过pip安装python模块
pip install pyzabbix
以上是关于CentOS6安装Pyhon3的主要内容,如果未能解决你的问题,请参考以下文章
简单讲透Mac环境下多版本python的环境变量设置,仅对小白生效
在Tomcat的安装目录下conf目录下的server.xml文件中增加一个xml代码片段,该代码片段中每个属性的含义与用途