Python-Linux上安裝Python
阿新 • • 發佈:2018-11-01
nload inux bsp 提取 https -s root com color
Linux 上安裝 Python
官網下載:https://www.python.org/downloads/
本文安裝包下載鏈接:https://pan.baidu.com/s/1uL2JyoY_gClfOtyH0CcjfA 提取碼:elan
詳細操作步驟
1、安裝相關插件
[root@bJ ~]# yum install zlib-devel openssl openssl-devel gcc
2、安裝python
[root@bJ ~]# tar xf Python-3.6.3.tar.xz -C /usr/src/
[root@bJ ~]# cd /usr/src/Python-3.6.3/
[root@bJ Python-3.6.3]# ./configure --enable-optimizations
[root@bJ Python-3.6.3]# make && make install
3、安裝完成後做個軟鏈接方便調用
[root@bJ Python-3.6.3]# ln -s /usr/local/bin/python3.6 /bin/ [root@bJ Python-3.6.3]# ln -s /usr/local/bin/pip3.6 /bin/
4、測試是否安裝成功
[root@bJ Python-3.6.3]# python3.6Python 3.6.3 (default, Nov 1 2018, 12:19:44) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print("hello world") hello world
Python-Linux上安裝Python