Problems importing python-Xlib

前端 未结 8 716
暖寄归人
暖寄归人 2021-02-07 07:39

I installed a new module and it appears as if one of its dependencies was not already installed. The module is called Xlib.display. Here is the error message I received:

8条回答
  •  梦如初夏
    2021-02-07 08:29

    I was having the same problem, but the solutions above didn't work for me. Since I had installed python through the anaconda package, when I used:

    sudo apt-get install  python-xlib
    

    Xlib was still undetectable by python2. The solution in my case was to use:

    anaconda search -t conda python-xlib
    

    Then find the package from the anaconda api, mine was erik/python-xlib. Install it using:

    conda install --channel https://conda.anaconda.org/erik python-xlib
    

    Then it worked.

提交回复
热议问题