LoginSignup
2
0

More than 5 years have passed since last update.

CentOS6のPythonを2系から3系にする

Last updated at Posted at 2017-09-25

CentOSの6系のPythonを2系から3系(3.5)にしたかったのだが、
若干はまったのでメモ

yum install -y python35u python35u-libs python35u-devel python35u-pip

しようとしたら、yumがうごかなくなった

1 /etc/yum.repos.d/epel.repoを直す
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

2 sed ~ をやる
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

3 パッケージのインストール
yum install -y https://centos6.iuscommunity.org/ius-release.rpm

4 必要なもののインストール
yum install -y python35u python35u-libs python35u-devel python35u-pip

3系のインストールができた。
python3.5 -V
Python 3.5.2

参考にしたURL

  1. http://d.hatena.ne.jp/C_6B4A2B/20130427/1367073209
  2. http://qiita.com/kyrya/items/d3a4cba0ff2aa9a4a402
  3. http://qiita.com/f-akazawa/items/5ec741f8a5cca999d7b3
  4. https://weblabo.oscasierra.net/python3-centos7-yum-install/
2
0
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
2
0