-
Notifications
You must be signed in to change notification settings - Fork 76
Howto: Install pydbus in Anaconda or Conda python v3.6
The Anaconda / Conda suite can install and maintain several different python environments, including python3.6, in a portable user directory tree, all without needing elevated privileges. Getting pydbus running inside a 'conda' environment takes a few more steps because of the many system libraries pydbus requires. These instructions will add the necessary system libraries pydbus needs to a python3.6 environment, also without requiring elevated privileges.
These instructions are for the 'rpm' using of the Linux distributions, and tested on Centos EL7, which should also work for the Fedora/ RedHat / similar distros. The same ideas should work as well for the other packaging systems.
Download then create an Anaconda environment in a user directory using the Anaconda instructions. In this case:
bash Anaconda3-4.3.0-Linux-x86_64.sh
; accept defaults.
cd ~/anaconda3/bin
conda update conda
conda update anaconda
anaconda-navigator
;Choose: Environments;Create;name py36 environment python version 3.6;exit
;It isn't necessary to use the Anaconda gui, but it installs the most used packages quickly.
source activate py36
pip install -U pip
;now a generic python 3.6 environment is ready.
pip install pydbus
;now fetch and install the support libraries
mkdir ~/p36extras;cd ~/p36extras
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
;unpack them, should all go into ./usr/
for rpm in *rpm; do rpm2cpio $rpm | cpio -idmv; done
;copy the necessary to where the new environment will find them
cp -a usr/lib64/* ~/anaconda3/envs/py36/lib/
; Now, test:
python3.6
Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pydbus
>>>