2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7.6 に Python3系をインストール手順

Last updated at Posted at 2019-05-16
  • CentOSバージョン確認
cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
  • リポジトリ追加
yum install -y https://centos7.iuscommunity.org/ius-release.rpm

/etc/yum.repos.d 下に ius.repo などのリポジトリが追加されます。

  • Python3のパッケージを検索します、結果ある数字大きいほうをご利用ください。
yum search python36
  • インストール
yum install -y python36u python36u-libs python36u-devel python36u-pip
  • 確認
python3.6 --version
Python 3.6.7


 which python3.6
/usr/bin/python3.6
  • pip 確認
pip3.6 --version
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
  • pipでパッケージインストール
sudo pip3.6 install requests

+.pyファイルの一番上に python3.6 明確に指定

#!/usr/bin/python3.6
2
2
1

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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?