CentOS 7 install Python 3 and wxPython

20 篇文章 0 订阅

目录

Install Python 3

Install epel and IUS rpm package sources. 

Install python36

Install wxPython for Python 3


Prepare a CentOS 7, update OS when installed it, then install the “Development tools”.

# yum groupinstall "development tools" -y
# yum install kernel-headers kernel-devel -y

Install Python 3

  1. Install epel and IUS rpm package sources. 

# yum install epel-release -y
# yum install -y https://centos7.iuscommunity.org/ius-release.rpm

If clean yum cache:

# yum clean all; yum makecache

Note:

IUS rpm package sources:

rpm -ivh https://rhel5.iuscommunity.org/ius-release.rpm     # RHEL 5
rpm -ivh https://rhel6.iuscommunity.org/ius-release.rpm     # RHEL 6
rpm -ivh https://rhel7.iuscommunity.org/ius-release.rpm     # RHEL 7

rpm -ivh https://centos5.iuscommunity.org/ius-release.rpm   # CentOS 5
rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm   # CentOS 6
rpm -ivh https://centos7.iuscommunity.org/ius-release.rpm   # CentOS 7

If you want install ius-release, must install epel-release first.

Install python36

# yum install python36 python36-devel -y

If pip isn’t already installed, then install it:

# python36 -m ensurepip

Update pip:

# python -m pip install --upgrade pip setuptools wheel  or
# pip3 install --upgrade pip setuptools wheel

Install wxPython for Python 3

Need install some development packsges and GTK before installing wxPython.

# yum install -y dpkg-devel
# yum install -y libjpeg-turbo-devel
# yum install -y libtiff-devel
# yum install -y SDL SDL-devel
# yum install -y gstreamer-plugins-base-devel
# yum install -y gstreamer gstreamer-devel
# yum install -y gtk2 gtk2-devel
# yum install -y gtk3 gtk3-devel
# yum install -y webkitgtk3-devel webkitgtk3 webkitgtk4-devel webkitgtk4
# yum install -y libSM libSM-devel
# yum install -y tk tk-devel
# yum install -y wxGTK wxBase wxGTK-gl wxGTK-devel wxGTK3-devel
# yum install -y freeglut freeglut-devel
# yum install -y libestr-devel
# yum install -y libnotify-devel
# yum install -y libconfig-devel

Now, we can install wxPython.

# pip3 install wxPython

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值