Installing python3 autokey on Fedora 26

210 views
Skip to first unread message

Ben

unread,
Nov 2, 2017, 9:41:09 AM11/2/17
to autoke...@googlegroups.com
Hi,

I've been lurking on this list for a long time.  Been using the old version of autokey  0.90.4 that comes as the default on Fedora, but have been meaning to try the pip install for a long time.

I finally got around to it, and ran into the dependency problems that other folks have run into:

    checking for DBUS... no
    configure: error: Package requirements (dbus-1 >= 1.6) were not met:
    
    Package 'dbus-1', required by 'virtual:world', not found

I searched for "dbus-1" on multiple package websites, and they all said that this was found in dbus-devel.  Installed that with dnf, which partly resolved the dependencies issue, but then got a new error:

    checking for DBUS... yes
    checking for DBUS_GLIB... no
    configure: error: Package requirements (dbus-glib-1 >= 0.70) were not met:
    
    Package 'dbus-glib-1', required by 'virtual:world', not found

Next, I tried installing dbus-python-devel and dbus-glib-devel and that worked:

  Cloning https://github.com/autokey-py3/autokey to /tmp/pip-xq3sb_9t-build
Collecting dbus-python (from autokey==0.93.10)
  Using cached dbus-python-1.2.4.tar.gz
Requirement already satisfied: pyinotify in /usr/lib/python3.6/site-packages (from autokey==0.93.10)
Collecting python3-xlib (from autokey==0.93.10)
Building wheels for collected packages: dbus-python
  Running setup.py bdist_wheel for dbus-python ... done
  Stored in directory: /run/user/1000/.unburden-bmatteso/cache/pip/wheels/b2/b5/8f/008366d0f3ca5b1dd74be931fde265aca2042a5ae292d9b31d
Successfully built dbus-python
Installing collected packages: dbus-python, python3-xlib, autokey
  Running setup.py install for autokey ... done
Successfully installed autokey-0.93.10 dbus-python-1.2.4 python3-xlib-0.15

So looks like Fedora users need to install dbus-devel and dbus-glib-devel with dnf before doing the pip3 install (in addition to python3 python3-wheel python3-pip, which I had already installed).

Regards,
Ben


Joe

unread,
Nov 2, 2017, 9:51:19 PM11/2/17
to autoke...@googlegroups.com, Ben
Thank you! We have had a couple of Fedora users who couldn't figure this
out. I'll add some notes to our wiki.

Would the proper command be:

dnf install dbus-devel dbus-python-devel dbus-glib-devel

Is anything else needed other than the pip3 command?

Joe
> --
> You received this message because you are subscribed to the Google
> Groups "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autokey-user...@googlegroups.com
> <mailto:autokey-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Ben

unread,
Nov 7, 2017, 2:58:20 PM11/7/17
to Joe, autoke...@googlegroups.com
Joe,

Sorry for the slow reply.  I wanted to try one of my other Fedora 26 boxes, and it failed there:
  Cloning https://github.com/autokey-py3/autokey to /tmp/pip-vetpf_ri-build
Collecting dbus-python (from autokey==0.93.10)

Requirement already satisfied: pyinotify in /usr/lib/python3.6/site-packages (from autokey==0.93.10)
Collecting python3-xlib (from autokey==0.93.10)
Installing collected packages: dbus-python, python3-xlib, autokey
  Running setup.py install for autokey ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-vetpf_ri-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-8qom63__-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-vetpf_ri-build/setup.py", line 22, in <module>
        import autokey.common as R
      File "/tmp/pip-vetpf_ri-build/lib/autokey/common.py", line 19, in <module>
        import os, dbus.service
      File "/home/bmatteso/.local/lib/python3.6/site-packages/dbus/__init__.py", line 77, in <module>
        import dbus.types as types
      File "/home/bmatteso/.local/lib/python3.6/site-packages/dbus/types.py", line 6, in <module>
        from _dbus_bindings import (
    ImportError: /home/bmatteso/.local/lib/python3.6/site-packages/_dbus_bindings.so: undefined symbol: _Py_ZeroStruct

Googling this revealed that it's usually caused by mixing python2 with python3 packages.  But I can't see where I dragged in any python2 packages ...

Ben

To unsubscribe from this group and stop receiving emails from it, send an email to autokey-users+unsubscribe@googlegroups.com <mailto:autokey-users+unsubscri...@googlegroups.com>.

Joe

unread,
Nov 7, 2017, 4:01:56 PM11/7/17
to autoke...@googlegroups.com, Ben
This has been really difficult for you. I hope we can solve this so
other Fedora users don't have to go through all of this.

When you uninstalled AutoKey 0.90.4, did you run something equivalent to

sudo apt autoremove

(whatever that looks like in dnf)? I didn't think of this until now. It
removes all packages that were automatically installed only as
dependencies of packages which are no longer installed.

You could try to run it now. It should ask permission to delete the
packages. Review what it wants to do before telling it to go ahead. It's
pretty good, but not perfect.

This probably won't help, but it's worth a try.

Assuming this doesn't fix it, you can file an  autokey-py3 issue on
GitHub or post on that Fedora thread I started or a new thread on that
forum. You'll need Troy or other Fedora users to figure this one out. It
does look like it's pretty close to working.

Joe
> <https://github.com/autokey-py3/autokey>
> Collecting git+https://github.com/autokey-py3/autokey
> <https://github.com/autokey-py3/autokey>
>   Cloning https://github.com/autokey-py3/autokey
> autokey-user...@googlegroups.com
> <mailto:autokey-users%2Bunsu...@googlegroups.com>
> <mailto:autokey-user...@googlegroups.com
> <mailto:autokey-users%2Bunsu...@googlegroups.com>>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autokey-user...@googlegroups.com
> <mailto:autokey-user...@googlegroups.com>.

Ben

unread,
Nov 7, 2017, 5:48:08 PM11/7/17
to Joe, autoke...@googlegroups.com
Joe et al,

I figured this out (somewhat accidentally).  On the same machine I was trying to start up a kvm guest, but couldn't because firewalld had crashed (another story) with:

Nov 07 16:33:56 odysseus abrt-server[17052]: Traceback (most recent call last):
Nov 07 16:33:56 odysseus abrt-server[17052]:   File "/usr/bin/abrt-action-notify", line 21, in <module>
Nov 07 16:33:56 odysseus abrt-server[17052]:     import dbus
Nov 07 16:33:56 odysseus abrt-server[17052]:   File "/usr/lib64/python3.6/site-packages/dbus/__init__.py", line 77, in <module>
Nov 07 16:33:56 odysseus abrt-server[17052]:     import dbus.types as types
Nov 07 16:33:56 odysseus abrt-server[17052]:   File "/usr/lib64/python3.6/site-packages/dbus/types.py", line 6, in <module>
Nov 07 16:33:56 odysseus abrt-server[17052]:     from _dbus_bindings import (
Nov 07 16:33:56 odysseus abrt-server[17052]: ImportError: /usr/lib64/python3.6/site-packages/_dbus_bindings.so: undefined symbol: _Py_ZeroStruct
Nov 07 16:33:57 odysseus abrt-server[17105]: Removing problem provoked by ABRT(pid:17052): '/var/spool/abrt/Python3-2017-11-07-16:33:56-17103'

Pretty familiar.  Checked /usr/lib64/python3.6/site-packages/_dbus_bindings.so which came from python3-dbus, so verified python3-dbus:

rpm -qV python3-dbus

and got a bunch of output (bad).

Everything worked once I reinstalled it: dnf reinstall python3-dbus. 

Not only did my firewall start (and my kvm guest), but the python3 install worked as well.

At some point I must have done a pip3 install as root that messed this up (although I no longer remember doing it).

So you can safely document what you had planned ...

Regards,
Ben


        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.




--
You received this message because you are subscribed to the Google Groups "autokey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autokey-users+unsubscribe@googlegroups.com <mailto:autokey-users+unsubscri...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages