在Linux SUSE或RedHat上,如何加载Python 2.7 [英] On linux SUSE or RedHat, how do I load Python 2.7

查看:70
本文介绍了在Linux SUSE或RedHat上,如何加载Python 2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以提供在SUSE和RedHat上安装python版本2.7所需的步骤吗?那里的版本大约是2.4,为了使我的脚本正常工作,我需要至少达到2.6. 因此,安装后,我可以在xTerm中键入Python并获取Python 2.7命令行界面.

Can someone provide the steps needed to install python version 2.7 on SUSE and RedHat? It version that is on there is like 2.4 and I need to have it at at least 2.6 to make my script work. So after the install, I can type Python in a xTerm and get the Python 2.7 command line interface.

推荐答案

下载源代码和安装的说明:

Instructions to download source and install:

https://www.python.org/download/

注意:您应该检查python 2.7.x的最新版本,因为它会经常更新.当前(2017年10月),最新版本是2.7.14,尽管此评论会变旧,并且新版本可能每6个月左右发布一次.

NOTE: You should check for the latest version of python 2.7.x, as it gets updated frequently. Currently (Oct 2017), the latest version is 2.7.14 though this comment will get old and new versions likely will be released every 6 months or so.

wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz # Download
tar xvfz Python-2.7.14.tgz # unzip
cd Python-2.7.14 # go into directory
./configure
make # build
su # or 'sudo su' if there is no root user
make altinstall

(进行安装->根据Ignacio的评论进行altinstall).

( make install -> make altinstall per Ignacio's comment).

这篇关于在Linux SUSE或RedHat上,如何加载Python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆