How to install pyatspi?

后端 未结 1 1396
既然无缘
既然无缘 2021-01-14 05:15

I\'m using ldtp and while I import it ,my idle jump out with a error:

from ldtp import *
Traceback (most recent call last):
File \"\", line 1,          


        
相关标签:
1条回答
  • 2021-01-14 06:02

    pyatspi is a part of GNOME. What you got involved into by building pyatspi from source was leading you into building a significant part of GNOME from source. No easy task at all.

    Your best bet is to find AT SPI package for your distribution. You did not specify what linux distribution do you have. But for most common distributions such packages exist.

    First make sure you have got python-gobject installed

    For rpm-based distributions

     rpm -q python-gobject
    

    For dpkg-based:

     dpkg -s python-gobject
    

    Install it if necessary.

    Next install a package containing pyatspi for your distribution. For instance for OpenSUSE you need to install python-atspi

    zypper in python-atspi
    

    For Ubuntu and derivatives it is python-pyatspi:

    apt-get install python-pyatspi
    

    For RedHat, Fedora and derivatives it is at-spi-python

    yum install at-spi-python
    

    Having got that you should be able to type

    python -c "import gi,pyatspi"
    
    0 讨论(0)
提交回复
热议问题