Skip to content

Howto: Install pydbus for python3.6 on Centos EL7

Harry G. Coin edited this page Feb 22, 2017 · 1 revision

Installing pydbus on Centos EL7 for python3.6 doesn't follow the usual steps. Because of the goals of Centos, users in production environments prefer to enable as few repositories as possible. Python3.6 has to be installed from the ius repository, while none of the 3.4 'native' packages are loaded. This uses bleeding edge fc26 versions (as of this writing, 2/17) of the related packages, including glib2. I advise using the latest available. Consider using 3.6 when deployment is not expected until 2018 (estimate).

Here are the steps as of 2/17 to install pydbus for python3.6 on Centos EL7 for x86_64:

After clean install, as root:

yum install https://centos7.iuscommunity.org/ius-release.rpm
yum upgrade
yum remove python3.4*   #just in case
yum install python36u*
mkdir ~/p36;cd ~/p36
wget https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/p/python3-gobject-3.22.0-3.fc26.x86_64.rpm
wget https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/p/python3-gobject-base-3.22.0-3.fc26.x86_64.rpm
wget https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/p/python3-cairo-1.10.0-20.fc26.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/gobject-introspection/1.51.3/1.fc26/x86_64/gobject-introspection-1.51.3-1.fc26.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/glib2/2.51.2/1.fc26/x86_64/glib2-2.51.2-1.fc26.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/glib2/2.51.2/1.fc26/x86_64/glib2-devel-2.51.2-1.fc26.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/gobject-introspection/1.51.3/1.fc26/x86_64/gobject-introspection-devel-1.51.3-1.fc26.x86_64.rpm
rpm -U *
#Notice the errors, just one which is unimportant.
rpm -U --nodeps *
pip3.6 install --upgrade pip
pip3.6 install pydbus

#Test:
python3.6
Python 3.6.0 (default, Jan 19 2017, 16:59:54) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pydbus
>>>
Clone this wiki locally