LoginSignup
1
1

More than 5 years have passed since last update.

CentOS6.3にPython2.7をyumでインストール

Last updated at Posted at 2016-11-29

CentOS 6.3にPython2.7をyumでインストールしてみました。

ちょっとだけ躓いたので一応記録。

元ネタはこちら。

リポジトリ追加

まず、リポジトリの追加を行います。

yum -y install centos-release-scl

Python2.7のインストール

続いてPython2.7をインストールする。

yum -y install python27

環境の設定等

筆者の場合、インストール先が

/opt/rh/python27/root

以下に必要なものが全てインストールされたので、このままだと実行できません。

そこで、

/opt/rh/python27/enable

に環境設定が書かれているので、これをインポートします。

. /opt/rh/pytho27/enable

これで

$ python -V
Python 2.7.8

となります。

.bash_profileなど入れておくといつでも使えるようになります。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1