目录
Install epel and IUS rpm package sources.
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
-
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